com.pietschy.command.face
Interface FaceRenderer

All Known Implementing Classes:
DefaultFaceRenderer, MacOSFaceRenderer

public interface FaceRenderer

FaceRenderers are used by the libarary to configure the properties of buttons and menus. FaceRenderers allow the library to apply global policies to the appearance of buttons and menus created by the library.

Default implementations are DefaultFaceRenderer and MacOSFaceRenderer.

See Also:
DefaultFaceRenderer, MacOSFaceRenderer, Defaults.setFaceRenderer(FaceRenderer)

Method Summary
 void configureButton(javax.swing.AbstractButton button, RenderContext renderContext)
          Configures the specified button using the specified RenderContext.
 void configureMenu(javax.swing.JMenuItem menu, RenderContext renderContext)
          Configures the specified button using the specified RenderContext.
 boolean isHideToobarText()
          Checks if toolbar buttons should never display text.
 boolean isPositionToolbarTextBelowIcon()
          Checks if text should always be rendered below the icons on toolbars.
 void setHideToobarText(boolean hideTextOnToolbars)
          Configures this render to never render text on toolbar buttons.
 void setPositionToolbarTextBelowIcon(boolean toolbarTextBelow)
          Configures this renderer to always display toolbar text below the icon.
 

Method Detail

configureButton

void configureButton(javax.swing.AbstractButton button,
                     RenderContext renderContext)
Configures the specified button using the specified RenderContext.

Parameters:
button - the button to configure.
renderContext - the RenderContext of the button.

configureMenu

void configureMenu(javax.swing.JMenuItem menu,
                   RenderContext renderContext)
Configures the specified button using the specified RenderContext.

Parameters:
menu - the menu to configure.
renderContext - the RenderContext of the menu.

setPositionToolbarTextBelowIcon

void setPositionToolbarTextBelowIcon(boolean toolbarTextBelow)
Configures this renderer to always display toolbar text below the icon.

Parameters:
toolbarTextBelow - true to display toolbar text below the icon, false to use the face configuration.

isPositionToolbarTextBelowIcon

boolean isPositionToolbarTextBelowIcon()
Checks if text should always be rendered below the icons on toolbars.

Returns:
true if the text of toolbar buttons should aways be rendered below the icon, false to use the face configuration as is.

setHideToobarText

void setHideToobarText(boolean hideTextOnToolbars)
Configures this render to never render text on toolbar buttons.

Parameters:
hideTextOnToolbars - true to never render text on toolbar buttons, false to use the face configration.

isHideToobarText

boolean isHideToobarText()
Checks if toolbar buttons should never display text.

Returns:
true if toolbar buttons should never display text, false if the face normal configuration should be used.


Copyright © 2006 - 2007 Andrew Pietsch