LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingSplitter

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.LySwingContainer
                      extended by leon.view.win.swing.LySwingSplitter
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LyGraphicalComponent, LyGraphicalContainer, LyGraphicalFieldItem, LyGraphicalPanel, LyGraphicalSplitter, LyViewComponent, LyFreeInterface, LySetPopupMenuInterface, LySwingComponent

public class LySwingSplitter
extends LySwingContainer
implements LySwingComponent, LyGraphicalSplitter

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

A container of panel type with splitter allows to display different panels that are splitted by vertical or horizontal separation bars. These bars can be moved so as to allocate more or less place to each of the panels. The minimum number of panels that is required is two panels. There is no constraint on the maximum number of panels allowed in such a container.

Including such containers in containers of same type allows to get windows combining vertical and horizontal separators.

See Also:
LySplitter

Nested Class Summary
 class LySwingSplitter._LyJSplitterComponentAdapter
          Handles component resize and checks if minimum sizes are valid.
 
Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingSplitter(LySplitter splitter)
          Class constructor of a Splitter object for the Swing target.
 
Method Summary
 java.awt.Container createBorderLayoutPanel()
          Creates panel with a border layout.
 java.awt.Component createHorizontalSeparator(java.awt.Color color)
          Creates an horizontal separator.
 java.awt.Component createVerticalSeparator(java.awt.Color color)
          Creates a vertical separator.
 java.awt.Component getComponent()
          (non-Javadoc).
 int[] getIntSizesArray(java.lang.String sizes, int panelCount)
          Transforms a string representing a list of int separated with the space character in an array of int.
 int getSplitterSize()
          Gets the size of the splitter if available, else 0.
 void initialize()
          Retrieves the initial orientation of this splitter and initializes the class attributes.
 void setActivePart(LySplitter.ActivePart activePart)
          Updates attribute activePart to the given value.
 void setContent()
          Fills this splitter with all its panels.
 void setLeftMinimumSize(java.awt.Dimension minSize)
          Sets the minimumSize of the left area.
 void setRightMinimumSize(java.awt.Dimension minSize)
          Sets the minimumSize of the right area.
 void setSelected(boolean status)
           
 void setSizes(java.lang.String sizes)
          Updates attribute sizes to the given value.
 void updateMinimumSize(LyComponent child, java.awt.Dimension d)
          Updates the minimum size occupied by the specified child component.
 
Methods inherited from class leon.view.win.swing.LySwingContainer
actionPerformed, free
 
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, 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

LySwingSplitter

public LySwingSplitter(LySplitter splitter)
Class constructor of a Splitter object for the Swing target.

Parameters:
splitter - a SPLITTER component defined for every type of view targets. This splitter is initialized specificaly for the Swing view.
Method Detail

initialize

public void initialize()
Retrieves the initial orientation of this splitter and initializes the class attributes.


setContent

public void setContent()
Fills this splitter with all its panels.


getIntSizesArray

public int[] getIntSizesArray(java.lang.String sizes,
                              int panelCount)
Transforms a string representing a list of int separated with the space character in an array of int.

Parameters:
sizes - a string that contains a list of int
panelCount - the size of the returned array
Returns:
the array of int representing the specified String

createHorizontalSeparator

public java.awt.Component createHorizontalSeparator(java.awt.Color color)
Creates an horizontal separator.

Parameters:
color - the color of the separator
Returns:
the created separator
See Also:
LyJSeparator

createVerticalSeparator

public java.awt.Component createVerticalSeparator(java.awt.Color color)
Creates a vertical separator.

Parameters:
color - the color of the separator
Returns:
the created separator
See Also:
LyJSeparator

createBorderLayoutPanel

public java.awt.Container createBorderLayoutPanel()
Creates panel with a border layout.

Returns:
the created panel

getSplitterSize

public int getSplitterSize()
Gets the size of the splitter if available, else 0.

Returns:
the size of the splitter

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()

setLeftMinimumSize

public void setLeftMinimumSize(java.awt.Dimension minSize)
Sets the minimumSize of the left area.

Parameters:
minSize - the dimension to use

setRightMinimumSize

public void setRightMinimumSize(java.awt.Dimension minSize)
Sets the minimumSize of the right area.

Parameters:
minSize - the dimension to use

updateMinimumSize

public void updateMinimumSize(LyComponent child,
                              java.awt.Dimension d)
Updates the minimum size occupied by the specified child component. This splitter object can have only two children so the minimum size is updated only for the left/top or right/bottom areas.

Overrides:
updateMinimumSize in class LySwingContainer
Parameters:
child - child component in this container
d - minimum size to use
See Also:
LySwingContainer.updateMinimumSize(LyComponent, Dimension)

setSizes

public void setSizes(java.lang.String sizes)
Description copied from interface: LyGraphicalSplitter
Updates attribute sizes to the given value.

Specified by:
setSizes in interface LyGraphicalSplitter
Parameters:
sizes - New value of sizes.

setSelected

public void setSelected(boolean status)

setActivePart

public void setActivePart(LySplitter.ActivePart activePart)
Description copied from interface: LyGraphicalSplitter
Updates attribute activePart to the given value.

Specified by:
setActivePart in interface LyGraphicalSplitter
Parameters:
activePart - New value of activePart.

(c) January 2013 - W4 S.A.

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