|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.win.swing.LySwingObject
leon.view.win.swing.LySwingFieldItem
leon.view.win.swing.LySwingPanel
leon.view.win.swing.LySwingContainer
leon.view.win.swing.LySwingTabs
public class LySwingTabs
This class implements the Tabs object (as described in the dtd) for swing viewer.
A container of tab type allows to display different panels in the same graphical area, only one panel being visible at once. Each panel is actually contained in a tab, the container being made up of a set of tabs. The displaying that corresponds to a container of tab type must present two areas: a first one showing the names of the different tabs and a second one allowing to display the panels.
LyTabs
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static float |
DARKER_FACTOR
Default darkening factor for uneselected tabs. |
Constructor Summary | |
---|---|
LySwingTabs(LyTabs tabs)
Class constructor of a Tabs object for the Swing target. |
Method Summary | |
---|---|
void |
addPanel(LySwingComponent component,
int pos,
java.lang.String label,
java.awt.Color bgcol,
java.awt.Color fgcol)
Associates a panel to the specified tab. |
void |
addPanel(LySwingComponent component,
int pos,
java.lang.String label,
java.lang.String image,
java.awt.Color bgcol,
java.awt.Color fgcol)
Associates a panel to the specified tab. |
void |
addPanel(LySwingComponent component,
java.lang.String label,
java.awt.Color bgcol,
java.awt.Color fgcol)
Associates a panel to the specified tab. |
void |
addTab(LyTab tab,
int pos)
(non-Javadoc). |
LyJTabbedPane |
createTabPanel(java.awt.Color color)
Creates the tabbed panel. |
int[] |
getChildrenBounds(LyComponent children)
(non-Javadoc) |
java.awt.Component |
getComponent()
(non-Javadoc). |
void |
initialize()
Initializes the tab panel component with the default colors. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
removePanel(LySwingComponent component)
Removes a panel from the tabbed panel. |
void |
removeTab(LyTab tab)
(non-Javadoc). |
void |
setContent()
Fills this tabs with their associated panels and registers their event listeners. |
void |
setEnabled(java.lang.String tabId,
boolean enabled)
(non-Javadoc). |
void |
setLabel(java.lang.String tabId,
java.lang.String newLabel)
This method allows to change the label of a specific tab. |
void |
setSelectedTab(java.lang.String tabId)
Selects the specified tab in this component. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
(non-Javadoc). |
Methods inherited from class leon.view.win.swing.LySwingContainer |
---|
actionPerformed, free, updateMinimumSize |
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, 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 |
---|
public static final java.lang.String __VERSION
public static float DARKER_FACTOR
Constructor Detail |
---|
public LySwingTabs(LyTabs tabs)
tabs
- a TABS component defined for every type of view targets. This tabs container is
initialized specificaly for the Swing view.Method Detail |
---|
public void initialize()
public void setContent()
public LyJTabbedPane createTabPanel(java.awt.Color color)
color
- the background color
public void setSelectedTab(java.lang.String tabId)
setSelectedTab
in interface LyGraphicalTabs
tabId
- the id or label of the tab that must be selectedselectTab(String)
,
LyGraphicalTabs.setSelectedTab(java.lang.String)
public void addTab(LyTab tab, int pos)
addTab
in interface LyGraphicalTabs
tab
- The tabs to add to tabs list.pos
- Position where the sub-component is inserted.LyGraphicalTabs.addTab(leon.view.LyTab, int)
public void removeTab(LyTab tab)
removeTab
in interface LyGraphicalTabs
tab
- The tabs to remove to tabs list.LyGraphicalTabs.removeTab(leon.view.LyTab)
public void addPanel(LySwingComponent component, java.lang.String label, java.awt.Color bgcol, java.awt.Color fgcol)
component
- the panel to addlabel
- the name of the panel tabbgcol
- the background color of the panelfgcol
- the foreground color of the panelpublic void addPanel(LySwingComponent component, int pos, java.lang.String label, java.awt.Color bgcol, java.awt.Color fgcol)
component
- the panel to addlabel
- the name of the panel tabbgcol
- the background color of the panelfgcol
- the foreground color of the panelpublic void addPanel(LySwingComponent component, int pos, java.lang.String label, java.lang.String image, java.awt.Color bgcol, java.awt.Color fgcol)
component
- the panel to addlabel
- the name of the panel tabbgcol
- the background color of the panelfgcol
- the foreground color of the panelpublic void removePanel(LySwingComponent component)
component
- the panel to removepublic void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
ChangeListener.stateChanged(javax.swing.event.ChangeEvent)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void setEnabled(java.lang.String tabId, boolean enabled)
setEnabled
in interface LySetTabInterface
enabled
- true if the tab is enabled, false otherwiseLySetTabInterface.setEnabled(java.lang.String, boolean)
public void setLabel(java.lang.String tabId, java.lang.String newLabel)
setLabel
in interface LySetTabInterface
tabId
- the label or identifier of the tab to be changednewLabel
- the new label of the tab to be changedpublic java.awt.Component getComponent()
getComponent
in interface LySwingComponent
getComponent
in class LySwingObject
LySwingComponent.getComponent()
public int[] getChildrenBounds(LyComponent children)
getChildrenBounds
in class LySwingObject
LySwingObject.getChildrenBounds(leon.view.LyComponent)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |