|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.interactor.IlpDefaultPopupMenuFactory
public class IlpDefaultPopupMenuFactory
This class implements a default pop-up menu factory, that creates a static pop-up menu according to a given configuration.
This implementation can be used with the default interactor implementation to support interactor CSS customization.
A pop-up menu is created according to the menu items configured in this
factory. A null menu item represents a separator that is added
to the pop-up menu in the defined position.
The following example illustrates how you can create a pop-up menu using a CSS:
Subobject#viewInteractor {
class: 'ilog.cpl.interactor.IlpDefaultViewInteractor';
popupMenuFactory: @=popupMenuFactory;
}
Subobject#popupMenuFactory {
class: 'ilog.cpl.interactor.IlpDefaultPopupMenuFactory';
menuItem[0]: @=item0;
menuItem[1]: '';
menuItem[2]: @=item2;
}
Subobject#item0 {
class: 'javax.swing.JMenuItem';
label: 'Item 0';
}
Subobject#item2 {
class: 'javax.swing.JMenuItem';
label: 'Item 2';
}
| Constructor Summary | |
|---|---|
IlpDefaultPopupMenuFactory()
Default constructor. |
|
| Method Summary | |
|---|---|
JPopupMenu |
createPopupMenu(IlpInteractionContext context)
Creates a pop-up menu for the specified IlpInteractionContext. |
String |
getLabel()
Returns the pop-up menu label. |
JMenuItem[] |
getMenuItem()
Returns the list of menu items present in the pop-up menu created by this factory. |
JMenuItem |
getMenuItem(int index)
Returns the menu item present in the pop-up menu created by this factory. |
void |
setLabel(String l)
Sets the pop-up menu label. |
void |
setMenuItem(int index,
JMenuItem mi)
Sets an entry in the pop-up menu created by this factory. |
void |
setMenuItem(JMenuItem[] items)
Sets the entries present in the pop-up menu created by this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlpDefaultPopupMenuFactory()
| Method Detail |
|---|
public void setLabel(String l)
l - Pop-up menu label.public String getLabel()
public void setMenuItem(JMenuItem[] items)
A null entry represents a separator,
which is added to the pop-up menu.
Action
public void setMenuItem(int index,
JMenuItem mi)
Actionpublic JMenuItem[] getMenuItem()
public JMenuItem getMenuItem(int index)
index - Index of the menu item in the pop-up menu factory collection.public JPopupMenu createPopupMenu(IlpInteractionContext context)
IlpInteractionContext.
This implementation creates a static pop-up menu according to the factory configuration.
createPopupMenu in interface IlpPopupMenuFactorycontext - The interaction context that references the view for which
the pop-up menu is to be created.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||