Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Advanced Front Panel Customization Creating and Modifying Subpanels Customizing the Built-in Subpanels To Modify General Properties of a Built-In Subpanel  Previous   Contents   Next 
   
 

To Add a System-Wide Control to a Built-In Subpanel

  1. Create a Front Panel configuration file /etc/dt/appconfig/types/language/name.fp.

  2. Define the system-wide control in the file.

    Use the CONTAINER_NAME and CONTAINER_TYPE fields to specify the container for the control:

    	CONTROL control_name
     	{
     		CONTAINER_NAME					subpanel_name
     		CONTAINER_TYPE					SUBPANEL
     		...
     	}

    See "Defining Front Panel Controls".

  3. Save the configuration file.

  4. Choose Restart Workspace Manager from the Workspace menu.

    For example, the following control defined in a new file /etc/dt/appconfig/types/language/DigitalClock.fp adds the DigitalClock (in the Desktop_Tools application group) to the Personal Applications subpanel for all users.

    CONTROL DigitalClockControl
     {
     	TYPE						icon
     	CONTAINER_NAME			PersAppsSubpanel
     	CONTAINER_TYPE			SUBPANEL
     	ICON						Dtdgclk
     	PUSH_ACTION				DigitalClock
     	PUSH_RECALL				True
     }

To Remove a Control from a Built-In Subpanel

To Remove the Install Icon Control

  • Add the following field to the subpanel definition:

	CONTROL_INSTALL					False

To Change the Auto-Close Behavior of Subpanels

The default behavior of subpanels is to close when the user chooses a control, unless the user has moved the subpanel from its original position.

The Front Panel can be configured to keep subpanels open until the user explicitly closes them.

  1. Create a new Front Panel configuration file in:

    • System-wide: /etc/dt/appconfig/types/language/*.fp

    • Personal: HomeDirectory/.dt/types/*.fp

  2. Copy the default PANEL definition from /usr/dt/appconfig/types/language/dtwm.fp to the new file:

    	PANEL FrontPanel
     	{
     	  ...
     	}
  3. Add the following field to the PANEL definition:

    	SUBPANEL_UNPOST    False
  4. Save the new configuration file.

  5. Choose Restart Workspace Manager from the Workspace menu.

Defining Front Panel Controls

The user can create personal controls by dropping icons on the Install Icon controls.

While this provides easy customizability, the functionality it provides is a subset of the capabilities of Front Panel controls. For example, a control created using the Install Icon control cannot:

  • Provide animation

  • Display a client window

  • Change appearance when an event occurs (for example, upon receiving new mail)

    This section describes how to manually create Front Panel controls.

    For reference information on the syntax of Front Panel controls, see the dtfpfile(4X) man page.

Front Panel Control Definitions

The structure of a Front Panel control definition is:

CONTROL control_name
 {
   TYPE            control_type
   CONTAINER_NAME  value
   CONTAINER_TYPE  value
   other fields defining appearance and behavior
 }

Control Types

The TYPE field in the control definition specifies the basic behavior of the control.

Control TYPE

Control Behavior

icon (Default).

The control will run a specified action when the user clicks the control or drops a file on it.

blank

Placeholder used to adjust spacing of controls.

busy

Busy light. The control blinks (toggles images) when an action is invoked

client

A client window in the Front Panel.

clock

Clock.

date

Displays the current date.

file

Represents a file. Choosing the control runs the default action for the file.

 
 
 
  Previous   Contents   Next