LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyArea

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyFieldItem
          extended by leon.view.LyPanel
              extended by leon.view.LyContainer
                  extended by leon.view.LyAreaBase
                      extended by leon.view.LyArea
All Implemented Interfaces:
LyGetConstraintInterface, LyGetControllerInterface, LyGetIdInterface, LyGetLabelInterface, LyGetRefreshInterface, LyPdfInterface, LySetControllerInterface, LySetWaitingInterface, LyUpdateViewContentInterface

public class LyArea
extends LyAreaBase
implements LyGetRefreshInterface

The LyArea class implements generic behavior for the AREA components as described in views.dtd regardless of the requested target (win, swing, html...). It represents an area.

See Also:
LyAreaBase

Nested Class Summary
 
Nested classes/interfaces inherited from class leon.view.LyAreaBase
LyAreaBase.Border, LyAreaBase.Layout, LyAreaBase.Scrolling
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
static short EAST
           
static short NORTH
           
static short SOUTH
           
static short WEST
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyArea()
          Constructor with all required attributes.
 
Method Summary
 void addToolBar(LyToolBar toolBar)
          Adds a sub-component toolBar.
 void computePanelsPositions()
          Computes the position of each sub-panels for this area.
 void free()
          Free this component.
 LyPanel getBorderPanel(short position)
          Get panel at the given pos.
 LyToolBar getBottomLeftToolBar()
          Return the bottom left toolbar.
 LyToolBar getBottomRightToolBar()
          Return the bottom right toolbar.
 LyEnvironment getEnvironment()
          Gets specific environment of this area.
 int[] getGridSize()
          Returns the size of the grid representing the layout of this area.
 LyToolBar getLeftToolBar()
          Return the left toolbar.
 int[] getPanelPosition(LyPanel panel)
          Returns the position of a sub-panel for this area.
 LyToolBar getRightToolBar()
          Return the right toolbar.
 LyToolBar getToolBar()
          Return the top left toolbar.
 LyToolBar getTopLeftToolBar()
          Return the top left toolbar.
 LyToolBar getTopRightToolBar()
          Return the top right toolbar.
 boolean isBorderPanel(LyPanel panel)
          Indicates whether given panel is one of the border panel for current area.
 boolean isColumnsEqualWidth()
          Indicates whether all columns in the layout will be forced to have the same width.
 boolean isHidden()
          Checks if value of attribute hidden is set.
 boolean isScrollable()
          Retrieve the scrollable attribute.
 void reset()
          Reset this component.
 void setBorderPanel(LyPanel panel, short position)
          Set a border panel at the given position.
 void setBottomLeftToolBar(LyToolBar toolBar)
          Add a toolbar at the bottom left position.
 void setBottomRightToolBar(LyToolBar toolBar)
          Add a toolbar at the bottom right position.
 void setEnvironment(LyEnvironment environment)
          Sets specific environment of this area.
 void setHidden(boolean hidden)
          Sets attribute hidden to the given value.
 void setLeftToolBar(LyToolBar toolBar)
          Add a toolbar at the left position.
 void setRightToolBar(LyToolBar toolBar)
          Add a toolbar at the right position.
 void setToolBar(LyToolBar toolBar)
          Add a toolbar.
 void setTopLeftToolBar(LyToolBar toolBar)
          Add a toolbar at the top left position.
 void setTopRightToolBar(LyToolBar toolBar)
          Add a toolbar at the top right position.
 void setVisible(boolean status)
          Shows or hides the component/node.
 void setXmlFile(java.lang.String xmlFile)
          Initializes attribute xmlFile to the given value.
 
Methods inherited from class leon.view.LyAreaBase
addPanel, cloneComponent, getBorder, getBorder, getBorderWidth, getColor, getCommands, getConstraint, getController, getFont, getFontColor, getHorizontalSpacing, getIcon, getId, getLabel, getLayout, getLayout, getLayoutInfo, getPanel, getPanelCount, getRedirect, getRefresh, getScrolling, getScrolling, getSelectBar, getTemplate, getTip, getTitleBar, getToolBar, getToolBarCount, getVerticalSpacing, getXmlFile, insertPanel, insertToolBar, isClosable, isDefaultColor, isDefaultFont, isDefaultFontColor, isOpen, removePanel, setBorder, setBorderWidth, setClosable, setColor, setCommands, setConstraint, setController, setFont, setFontColor, setHorizontalSpacing, setIcon, setId, setLabel, setLayout, setLayoutInfo, setOpen, setRedirect, setRefresh, setScrolling, setSelectBar, setTemplate, setTip, setTitleBar, setVerticalSpacing, writeXml
 
Methods inherited from class leon.view.LyPanel
generatePdf, getLastModified, isIdle, print, setIdle, setLastModified, setPopupMenu, setWaiting
 
Methods inherited from class leon.view.LyFieldItem
addBeanData, buildBean, getBean, getBeanComponent, getBeanData, getBeanDatas, getChild, getChildCount, getErrorMessage, getFieldValue, getValue, setBean, setBeanComponent, setBeanDatas, setFieldValue, updateViewContent, validateInput
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, freeze, getBounds, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEventFunctions, getIdCode, getInternalId, getInternalView, getInternalView, getLock, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, useEventDefaultFunction, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.getinterface.LyGetRefreshInterface
getRefresh
 

Field Detail

__VERSION

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

NORTH

public static final short NORTH
See Also:
Constant Field Values

SOUTH

public static final short SOUTH
See Also:
Constant Field Values

EAST

public static final short EAST
See Also:
Constant Field Values

WEST

public static final short WEST
See Also:
Constant Field Values
Constructor Detail

LyArea

public LyArea()
Constructor with all required attributes.

Method Detail

reset

public void reset()
Reset this component.
Overridden to reset border panels if needed.

Overrides:
reset in class LyComponent

free

public void free()
Free this component.
Overridden to free border panels if needed.

Overrides:
free in class LyFieldItem

getEnvironment

public LyEnvironment getEnvironment()
Gets specific environment of this area.

Overrides:
getEnvironment in class LyComponent
Returns:
specific environment of this area.

isScrollable

public boolean isScrollable()
Retrieve the scrollable attribute.

Overrides:
isScrollable in class LyPanel
Returns:
True if scrollable, false otherwise.

setEnvironment

public void setEnvironment(LyEnvironment environment)
Sets specific environment of this area.

Parameters:
environment - Specific environment of this area.

getToolBar

public LyToolBar getToolBar()
Return the top left toolbar.

Returns:
the toolbar

setToolBar

public void setToolBar(LyToolBar toolBar)
Add a toolbar.

Parameters:
toolBar - a toolbar

getTopRightToolBar

public LyToolBar getTopRightToolBar()
Return the top right toolbar.

Returns:
the toolbar

setTopRightToolBar

public void setTopRightToolBar(LyToolBar toolBar)
Add a toolbar at the top right position.

Parameters:
toolBar - a toolbar

getTopLeftToolBar

public LyToolBar getTopLeftToolBar()
Return the top left toolbar.

Returns:
the toolbar

setTopLeftToolBar

public void setTopLeftToolBar(LyToolBar toolBar)
Add a toolbar at the top left position.

Parameters:
toolBar - a toolbar

getLeftToolBar

public LyToolBar getLeftToolBar()
Return the left toolbar.

Returns:
the toolbar

setLeftToolBar

public void setLeftToolBar(LyToolBar toolBar)
Add a toolbar at the left position.

Parameters:
toolBar - a toolbar

getRightToolBar

public LyToolBar getRightToolBar()
Return the right toolbar.

Returns:
the toolbar

setRightToolBar

public void setRightToolBar(LyToolBar toolBar)
Add a toolbar at the right position.

Parameters:
toolBar - a toolbar

getBottomRightToolBar

public LyToolBar getBottomRightToolBar()
Return the bottom right toolbar.

Returns:
the toolbar

setBottomRightToolBar

public void setBottomRightToolBar(LyToolBar toolBar)
Add a toolbar at the bottom right position.

Parameters:
toolBar - a toolbar

getBottomLeftToolBar

public LyToolBar getBottomLeftToolBar()
Return the bottom left toolbar.

Returns:
the toolbar

setBottomLeftToolBar

public void setBottomLeftToolBar(LyToolBar toolBar)
Add a toolbar at the bottom left position.

Parameters:
toolBar - a toolbar

addToolBar

public void addToolBar(LyToolBar toolBar)
Description copied from class: LyAreaBase
Adds a sub-component toolBar.

Overrides:
addToolBar in class LyAreaBase
Parameters:
toolBar - The toolBar to add to toolBars list.
See Also:
LyAreaBase.addToolBar(leon.view.LyToolBar)

getBorderPanel

public LyPanel getBorderPanel(short position)
Get panel at the given pos.

Parameters:
position - Either NORTH, SOUTH, EAST or WEST position.
Returns:
the searched panel.

setBorderPanel

public void setBorderPanel(LyPanel panel,
                           short position)
Set a border panel at the given position.

Parameters:
panel - the border panel.
position - Either NORTH, SOUTH, EAST or WEST position.

isBorderPanel

public boolean isBorderPanel(LyPanel panel)
Indicates whether given panel is one of the border panel for current area.

Parameters:
panel - the panel to be checked.
Returns:
true if given panel is one of the border panel for current area, false otherwise.

computePanelsPositions

public void computePanelsPositions()
Computes the position of each sub-panels for this area.
Those positions will be stored in the _panelPositions variable as an array of 4 integers (column of the panel, row of the panel, width of the panel, height of the panel).
Global size of the grid will be stored in the _layoutSize variable as an array of two integers (width of the grid, height of the grid).


getPanelPosition

public int[] getPanelPosition(LyPanel panel)
Returns the position of a sub-panel for this area.

Parameters:
panel - the panel whose position must be returned.
Returns:
the position of a sub-panel as an array of 4 integers (column of the panel, row of the panel, width of the panel, height of the panel).
See Also:
computePanelsPositions()

getGridSize

public int[] getGridSize()
Returns the size of the grid representing the layout of this area.

Returns:
the size of the grid representing the layout of this area as an array of two integers (width of the grid, height of the grid).

isColumnsEqualWidth

public boolean isColumnsEqualWidth()
Indicates whether all columns in the layout will be forced to have the same width.

Returns:
true if all columns in the layout will be forced to have the same width, false otherwise.

setXmlFile

public void setXmlFile(java.lang.String xmlFile)
Initializes attribute xmlFile to the given value.

Overrides:
setXmlFile in class LyAreaBase
Parameters:
xmlFile - New value of xmlFile.

isHidden

public boolean isHidden()
Checks if value of attribute hidden is set.

Returns:
true if hidden is set, false otherwise.

setHidden

public void setHidden(boolean hidden)
Sets attribute hidden to the given value.

Parameters:
hidden - Boolean indicating if attribute hidden is set or unset.

setVisible

public void setVisible(boolean status)
Description copied from class: LyComponent
Shows or hides the component/node.

Overrides:
setVisible in class LyComponent
Parameters:
status - new visibility status
See Also:
LySetVisibleInterface.setVisible(boolean)

(c) January 2013 - W4 S.A.

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