|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.component.AbstractUIActionComponent<C>
javax.rad.genui.menu.AbstractUIMenuItem<IMenu>
javax.rad.genui.menu.UIMenu
public class UIMenu
Platform and technology independent menu. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
Field Summary | |
---|---|
protected List<IComponent> |
components
List of subcomponents. |
Fields inherited from class javax.rad.genui.UIComponent |
---|
lLastTranslationModified, parent |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Fields inherited from interface javax.rad.ui.IAlignmentConstants |
---|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
Constructor Summary | |
---|---|
|
UIMenu()
Creates a new instance of UIMenu . |
protected |
UIMenu(IMenu pMenu)
Creates a new instance of UIMenu with the given menu instance. |
|
UIMenu(String pText)
Creates a new instance of UIMenu . |
Method Summary | |
---|---|
void |
add(IComponent pComponent)
Adds the specified IComponent to the end of this container. |
void |
add(IComponent pComponent,
int pIndex)
Adds the specified IComponent to this container at the specified index. |
void |
add(IComponent pComponent,
Object pConstraints)
Adds the specified IComponent to the end of this container. |
void |
add(IComponent pComponent,
Object pConstraints,
int pIndex)
Adds the specified IComponent to this container with the specified
constraints at the specified index. |
void |
addNotify()
Makes this UIComponent displayable by adding it to an UIContainer . |
void |
addSeparator()
Appends a new separator at the end of the menu. |
void |
addSeparator(int pIndex)
Inserts a separator at the specified position. |
void |
beforeAddNotify(IComponent pParent)
Invoked before this component is added. |
IComponent |
getComponent(int pIndex)
Gets the nth IComponent in this container. |
int |
getComponentCount()
Gets the number of IComponent s in this panel. |
ILayout |
getLayout()
Gets the layout manager for this container. |
int |
indexOf(IComponent pComponent)
Gets the nth position of an IComponent in this container. |
void |
remove(IComponent pComponent)
Removes the specified component from this container. |
void |
remove(int pIndex)
Removes the IComponent , specified by index ,
from this container. |
void |
removeAll()
Removes all the components from this container. |
void |
removeNotify()
Makes this UIComponent undisplayable by removing it to an UIContainer . |
void |
setLayout(ILayout pLayout)
Sets the layout manager for this container. |
void |
updateTranslation()
Notification for updating the translation. |
Methods inherited from class javax.rad.genui.component.AbstractUIActionComponent |
---|
eventAction, getAccelerator, getActionCommand, getHorizontalAlignment, getImage, getMargins, getText, getVerticalAlignment, setAccelerator, setActionCommand, setHorizontalAlignment, setImage, setMargins, setMargins, setText, setVerticalAlignment |
Methods inherited from class javax.rad.genui.UIResource |
---|
equals, getUIResource, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.ui.component.IActionComponent |
---|
eventAction, getAccelerator, getActionCommand, getMargins, setAccelerator, setActionCommand, setMargins |
Methods inherited from interface javax.rad.ui.component.IIcon |
---|
getImage, setImage |
Methods inherited from interface javax.rad.ui.component.ILabel |
---|
getText, setText |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Methods inherited from interface javax.rad.ui.IAlignmentConstants |
---|
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment |
Field Detail |
---|
protected List<IComponent> components
Constructor Detail |
---|
public UIMenu()
UIMenu
.
IMenu
protected UIMenu(IMenu pMenu)
UIMenu
with the given menu instance.
pMenu
- the menuIMenu
public UIMenu(String pText)
UIMenu
.
pText
- the textIMenu
Method Detail |
---|
public ILayout getLayout()
getLayout
in interface IContainer
ILayout
ILayout
,
IContainer.setLayout(javax.rad.ui.ILayout)
public void setLayout(ILayout pLayout)
setLayout
in interface IContainer
pLayout
- the specified layout managerILayout
,
IContainer.getLayout()
public void addSeparator()
addSeparator
in interface IMenu
public void addSeparator(int pIndex)
addSeparator
in interface IMenu
pIndex
- an integer specifying the position at which to
insert the menu separatorpublic void add(IComponent pComponent)
IComponent
to the end of this container.
add
in interface IContainer
pComponent
- the IComponent
to be addedIComponent
public void add(IComponent pComponent, Object pConstraints)
IComponent
to the end of this container.
Also notifies the layout manager to add the component to
this container's layout using the specified constraints object.
add
in interface IContainer
pComponent
- the IComponent
to be addedpConstraints
- an object expressing
layout contraints for this componentIComponent
public void add(IComponent pComponent, int pIndex)
IComponent
to this container at the specified index. Also notifies the layout
manager to add the component to the this container's layout.
add
in interface IContainer
pComponent
- the IComponent
to be addedpIndex
- the position in the container's list at which to insert
the IComponent
; -1
means insert at the end
componentIComponent
public void add(IComponent pComponent, Object pConstraints, int pIndex)
IComponent
to this container with the specified
constraints at the specified index. Also notifies the layout
manager to add the component to the this container's layout using
the specified constraints object.
add
in interface IContainer
pComponent
- the IComponent
to be addedpConstraints
- an object expressing layout contraints for thispIndex
- the position in the container's list at which to insert
the IComponent
; -1
means insert at the end
componentIComponent
public void remove(int pIndex)
IComponent
, specified by index
,
from this container.
This method also notifies the layout manager to remove the
component from this container's layout via the
removeLayoutComponent
method.
remove
in interface IContainer
pIndex
- the index of the IComponent
to be removedIContainer.add(javax.rad.ui.IComponent)
,
IContainer.getComponentCount()
public void remove(IComponent pComponent)
remove
in interface IContainer
pComponent
- the IComponent
to be removedIContainer.add(javax.rad.ui.IComponent)
,
IContainer.remove(int)
public void removeAll()
removeLayoutComponent
method.
removeAll
in interface IContainer
IContainer.add(javax.rad.ui.IComponent)
,
IContainer.remove(int)
public int getComponentCount()
IComponent
s in this panel.
getComponentCount
in interface IContainer
IContainer.getComponent(int)
public IComponent getComponent(int pIndex)
IComponent
in this container.
getComponent
in interface IContainer
pIndex
- the index of the IComponent
to get.
public int indexOf(IComponent pComponent)
IComponent
in this container.
indexOf
in interface IContainer
pComponent
- the IComponent
to search
pComponent
in this container or
-1
if pComponent
is not addedpublic void updateTranslation()
UIComponent
will be added to a displayable containment hierarchy,
when its containment hierarchy is made displayable or the translation table will
be changed.
updateTranslation
in class AbstractUIActionComponent<IMenu>
UIComponent.setTranslation(TranslationMap)
,
UIComponent.addNotify()
public void beforeAddNotify(IComponent pParent)
beforeAddNotify
in class UIComponent<IMenu>
pParent
- the parentpublic void addNotify()
UIComponent
displayable by adding it to an UIContainer
.
This method is called internally by the genui and should not be called directly.
addNotify
in class UIComponent<IMenu>
UIComponent.removeNotify()
,
UIComponent.isNotified()
public void removeNotify()
UIComponent
undisplayable by removing it to an UIContainer
.
This method is called by the genui internally and should not be called directly.
Code overriding this method should call super.removeNotify
as the first line
of the overriding method.
removeNotify
in class UIComponent<IMenu>
UIComponent.addNotify()
,
UIComponent.isNotified()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |