LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingSelectBar

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingFieldItem
              extended by leon.view.win.swing.LySwingPanel
                  extended by leon.view.win.swing.LySwingSelectBar
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LyIsIdleInterface, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalPanel, LyGraphicalSelectBar, LyViewComponent, LyFreeInterface, LySetIdleInterface, LySetLabelInterface, LySetPopupMenuInterface, LySwingComponent

public class LySwingSelectBar
extends LySwingPanel
implements LySwingComponent, LyGraphicalSelectBar, LyActionListener, LySetIdleInterface, LyIsIdleInterface

This class implements the selection bar object (as described in the dtd) for swing viewer.

A navigation bar allows to display a set of page numbers (or page names) in order to go directly to the selected page. This bar must be associated to an area presenting paginated data (a long list for example).

See Also:
LySelectBar

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingSelectBar(LySelectBar selectBar)
          Class constructor of a Select bar object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 void addComponent(LyComponent component, int pos)
          Nothing is implemented yet.
 LyJHRefComponent createHRefComponent(java.lang.String label, java.awt.Image image, java.awt.Font font, boolean isVisited, boolean isSensitive, java.lang.Object clientData, java.awt.Color disable, java.awt.Color color, java.awt.Color highlight, java.awt.Color visited)
          Creates and configures a Hyper Text Reference component with the specified parameters.
 java.awt.Container createPanel()
          Creates the panel used to place all the messages.
 void enableNavTool(int idx, boolean sensitive)
          Enables/disables the specified nav tool.
 java.awt.Component getComponent()
          (non-Javadoc).
 java.lang.String getSourceId(java.lang.Object source)
          Retreives the source identifier of the object.
 void initialize()
          Initializes the graphic component.
 boolean isIdle()
          (non-Javadoc).
 void removeComponent(LyComponent component)
          Nothing is implemented yet.
 void setContent()
          Fills the panel with selectable items and enables or disables the navigation tools depending on the elemnts.
 void setIdle(boolean status)
          (non-Javadoc).
 void setLabel(java.lang.String label)
          Nothing is implemented yet.
 void setSelectBarTitle(java.lang.String title)
          Update the selection bar title.
 void setStartItem(int startItem)
          Nothing is implemented yet.
 void updateSelectItem(int idx, java.lang.String label, java.lang.String tooltip, java.lang.String id, boolean selected, boolean visible, boolean isSeparator)
          Updates the selectable item content.
 
Methods inherited from class leon.view.win.swing.LySwingPanel
setPopupMenu
 
Methods inherited from class leon.view.win.swing.LySwingFieldItem
getActionTransmitter, getSelectionTransmitter
 
Methods inherited from class leon.view.win.swing.LySwingObject
getBounds, getChildrenBounds, getDefaultFrame
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, free, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.graphic.LyGraphicalComponent
free, getViewComponent
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LySwingSelectBar

public LySwingSelectBar(LySelectBar selectBar)
Class constructor of a Select bar object for the Swing target.

Parameters:
selectBar - a SELECTBAR component defined for every type of view targets. This select bar is initialized specificaly for the Swing view.
Method Detail

initialize

public void initialize()
Initializes the graphic component. Creates the associated panel for the selectable items, and sets its background color to the default select bar color.


setContent

public void setContent()
Fills the panel with selectable items and enables or disables the navigation tools depending on the elemnts.


createPanel

public java.awt.Container createPanel()
Creates the panel used to place all the messages. Creates the associated navigation tools and adds them at the end of the panel.

Returns:
the new panel for the messages

setSelectBarTitle

public void setSelectBarTitle(java.lang.String title)
Update the selection bar title.

Parameters:
title - title to set
See Also:
LyJHRefComponent.setLabel(String)

enableNavTool

public void enableNavTool(int idx,
                          boolean sensitive)
Enables/disables the specified nav tool.

Parameters:
idx - index of the nav tool in the view
sensitive - indicates whether the component is activated or not

updateSelectItem

public void updateSelectItem(int idx,
                             java.lang.String label,
                             java.lang.String tooltip,
                             java.lang.String id,
                             boolean selected,
                             boolean visible,
                             boolean isSeparator)
Updates the selectable item content.

Parameters:
idx - index of the select item in the view
label - title of the selectable item
tooltip - tooltip of the selectable item. This attribute is not used in this implementation.
id - id of the selectable item
selected - indicates whether the component is selected or not
visible - indicates whether the component is activated or not
isSeparator - indicates whether the component is a separator or not

createHRefComponent

public LyJHRefComponent createHRefComponent(java.lang.String label,
                                            java.awt.Image image,
                                            java.awt.Font font,
                                            boolean isVisited,
                                            boolean isSensitive,
                                            java.lang.Object clientData,
                                            java.awt.Color disable,
                                            java.awt.Color color,
                                            java.awt.Color highlight,
                                            java.awt.Color visited)
Creates and configures a Hyper Text Reference component with the specified parameters.

Parameters:
label - the text displayed by this reference
image - the image displayed by this reference
font - the font used to display the label
isVisited - specifies the visited property of a link
isSensitive - specifies the sensitive property of a link
clientData - the underlying data used to properly configure this reference
disable - the disable color
color - the normal color
highlight - the color used to display text when cursor is over the reference
visited - the visited color
Returns:
a new HRef component for the specified references

getSourceId

public java.lang.String getSourceId(java.lang.Object source)
Retreives the source identifier of the object.

Parameters:
source - the source object
Returns:
source identifier

actionPerformed

public void actionPerformed(LyActionEvent actionEvent)
(non-Javadoc).

Specified by:
actionPerformed in interface LyActionListener
See Also:
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)

setIdle

public void setIdle(boolean status)
(non-Javadoc).

Specified by:
setIdle in interface LySetIdleInterface
Parameters:
status - new idle status (LySetIdleInterface interface)
See Also:
LySetIdleInterface.setIdle(boolean)

isIdle

public boolean isIdle()
(non-Javadoc).

Specified by:
isIdle in interface LyIsIdleInterface
Returns:
true if the component is idle (it is not refreshed when modifications are applied).
See Also:
LyIsIdleInterface.isIdle()

setLabel

public void setLabel(java.lang.String label)
Nothing is implemented yet.

Specified by:
setLabel in interface LyGraphicalSelectBar
Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - the new value of label, not used
See Also:
LyGraphicalSelectBar.setLabel(String)

setStartItem

public void setStartItem(int startItem)
Nothing is implemented yet.

Specified by:
setStartItem in interface LyGraphicalSelectBar
Parameters:
startItem - the new value of startItem, not used
See Also:
LyGraphicalSelectBar.setStartItem(int)

addComponent

public void addComponent(LyComponent component,
                         int pos)
Nothing is implemented yet.

Specified by:
addComponent in interface LyGraphicalSelectBar
Parameters:
component - the component to add, not used
pos - the position where the component is added, not used
See Also:
LyGraphicalSelectBar.addComponent(LyComponent, int)

removeComponent

public void removeComponent(LyComponent component)
Nothing is implemented yet.

Specified by:
removeComponent in interface LyGraphicalSelectBar
Parameters:
component - the component to remove, not used
See Also:
LyGraphicalSelectBar.removeComponent(LyComponent)

getComponent

public java.awt.Component getComponent()
(non-Javadoc).

Specified by:
getComponent in interface LySwingComponent
Overrides:
getComponent in class LySwingObject
Returns:
this Swing view component
See Also:
LySwingComponent.getComponent()

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com