|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.japisoft.xmlpad.ToolBarModel
Here a data model for the main toolbar, this data model handles Actions. It is possible to dynamically add or remove toolbar actions. This data model is available inside the XMLContainer. This is only need when you want to customize a toolBar for an editing context.
If you want to add common action, use the ActionModel not this model
If is adviced to user not to use their own swing Action but rather XMLAction for commodity
XMLAction
,
com.japiosft.xmlpad.action.ActionModel
,
ToolBarModelListener
Constructor Summary | |
ToolBarModel(XMLContainer container)
|
Method Summary | |
void |
addAction(javax.swing.Action a)
Add a new Swing Action or XMLAction. |
void |
addSeparator()
Add a separator |
void |
addToolBarModelListener(ToolBarModelListener listener)
Add a new listener for the toolbar update |
void |
dispose()
Only when the container is disposed. |
javax.swing.Action |
getActionAt(int location)
|
void |
insertActionAt(javax.swing.Action a,
int location)
Insert an action for the location |
void |
insertSeparatorAt(int location)
Insert a separator at the location |
boolean |
isAction(int location)
|
boolean |
isSeparator(int location)
|
void |
removeAction(javax.swing.Action a)
Remove the a action |
void |
removeAction(javax.swing.Action a,
boolean definitly)
Remove a swing Action or XMLAction. |
void |
removeSeparator(int location)
Remove a separator at the location |
void |
removeToolBarModelListener(ToolBarModelListener listener)
Remove a listener for the toolbar update |
static void |
resetToolBarModel(ToolBarModel model)
Reset the toolBar model to include all action (Toolbarable) from the ActionModel |
void |
setEnabledListener(boolean enable)
Enable "real time" notification |
int |
size()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ToolBarModel(XMLContainer container)
Method Detail |
public void dispose()
public void addToolBarModelListener(ToolBarModelListener listener)
public void removeToolBarModelListener(ToolBarModelListener listener)
public void setEnabledListener(boolean enable)
public int size()
public void addAction(javax.swing.Action a)
public void removeAction(javax.swing.Action a, boolean definitly)
true
then
if a is a XMLAction, the dispose method will be called
public void removeAction(javax.swing.Action a)
public void insertActionAt(javax.swing.Action a, int location)
public javax.swing.Action getActionAt(int location)
public boolean isAction(int location)
public void addSeparator()
public void insertSeparatorAt(int location)
public void removeSeparator(int location)
public boolean isSeparator(int location)
public static void resetToolBarModel(ToolBarModel model)
ActionModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |