Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Advanced Front Panel Customization Organization of the Front Panel Definition General Syntax of the Front Panel Definition BOX Definitions  Previous   Contents   Next 
   
 

CONTROL Definitions

A CONTROL definition describes:

  • The CONTROL name

  • Whether the control is in a box, subpanel, or switch (CONTAINER_TYPE)

  • Which box, subpanel, or switch the control is in (CONTAINER_NAME)

  • The position of the CONTROL in the BOX (POSITION_HINTS).

  • Fields describing appearance and behavior of the control

    CONTROL control_name
     {
        CONTAINER_TYPE        BOX or SUBPANEL or SWITCH
        CONTAINER_NAME        box_name or subpanel_name or  switch_name
     TYPE        control_type
     POSITION_HINTS        position
        KEYWORD        value
         	KEYWORD        value
     	...
     }

SUBPANEL Definitions

A SUBPANEL definition describes:

  • The SUBPANEL name

  • The name of the control to which the subpanel is attached (CONTAINER_NAME)

  • Fields describing appearance and behavior specific to the subpanel

    SUBPANEL subpanel_name
     {
     	CONTAINER_NAME				control_name
     	KEYWORD					value
     	KEYWORD					value
        ...
     }

SWITCH Definition

The SWITCH definition describes:

  • The SWITCH name

  • Which BOX the SWITCH is in (CONTAINER_NAME)

  • The position of the SWITCH within the BOX (POSITION_HINTS)

  • Fields describing the appearance and behavior of the SWITCH

    SWITCH switch_name
     {
     	CONTAINER_NAME				box_name
     	POSITION_HINTS				position
     	KEYWORD					value
     	KEYWORD					value
        ...
     }

Modifying the Main Panel

The Main Panel is the Front Panel window, excluding the subpanels.

Figure 15-2 Main Panel containers

Modifications you can make include:

  • Adding or removing controls

  • Interchanging the positions of controls

To Add a Control to the Main Panel

  1. Create a Front Panel configuration file:

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

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

  2. Define the control in the file.

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

    CONTAINER_NAME  Top
     	CONTAINER_TYPE  BOX

    Use POSITION_HINTS to specify the left-to-right placement of the control. Since customizations have precedence over built-in controls, the new control will "bump" the existing control with that position one position to the right.

  3. Save the configuration file.

  4. Create an icon for the Front Panel control.

    See "Specifying the Icon Used by a Control".

  5. Choose Restart Workspace Manager from the Workspace menu.

    For example, the following control definition placed in the file /etc/dt/appconfig/types/language/audio.fp inserts an audio application control between the Clock and Calendar controls.

    CONTROL AudioApplication
     {
      TYPE             icon
      CONTAINER_NAME   Top
      CONTAINER_TYPE   BOX
      ICON             AudioApp
      POSITION_HINTS   2
      PUSH_ACTION      StartAudioApplication
      PUSH_RECALL      true
     }
 
 
 
  Previous   Contents   Next