|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.japisoft.framework.application.descriptor.InterfaceBuilder
Builder for the user interface. This class works with an XML descriptor. It will create menu and submenus, toolbars, popup for your main application frame.
| Field Summary | |
static java.lang.String |
MENU_RECENT_FILE
|
static java.lang.String |
MENU_RECENT_PROJECT
|
boolean |
treeModified
|
| Constructor Summary | |
InterfaceBuilder(java.net.URL input)
|
|
InterfaceBuilder(java.net.URL input,
ActionBuilder builder)
|
|
| Method Summary | |
void |
buildUI(java.io.InputStream input)
Build the user interface from this XML file descriptor |
javax.swing.Action |
getActionById(java.lang.String id)
|
java.lang.String |
getActionClassName(java.lang.String alias)
|
javax.swing.Icon |
getAppIcon()
|
javax.swing.JMenu |
getMenu(java.lang.String id)
|
javax.swing.JMenuBar |
getMenuBar()
|
com.japisoft.fastparser.node.SimpleNode |
getMenuNode(java.lang.String id)
|
java.util.ArrayList |
getModel(java.lang.String id)
|
javax.swing.JPopupMenu |
getPopup(java.lang.String id)
|
javax.swing.JToolBar |
getToolBarByGroup(java.lang.String group)
|
javax.swing.JToolBar |
getToolBarById(java.lang.String id)
|
boolean |
hasActionClassName(java.lang.String alias)
|
boolean |
hasPopup(java.lang.String id)
|
void |
insertMenuItemAtFirst(java.lang.String menuId,
javax.swing.Action a,
int limit)
Add a menu item for this menu id. |
boolean |
isApplicationDocumentModified()
|
boolean |
isEnabledActionForId(java.lang.String id)
Check the enabled/disabled state for its id |
void |
removeMenuItemForParam(java.lang.String menuId,
java.lang.String param)
Remove the following children item matching this param |
void |
saveApplicationDocument()
Save the current application document. |
void |
setActionClassAlias(java.lang.String alias,
java.lang.String className)
This is a way to not used a full class name in the file descriptor but rather an alias. |
void |
setApplicationDocumentModified()
Force a document modification |
void |
setEnabledActionForAllGroup(boolean enabled)
Enabled/Disabled all group |
void |
setEnabledActionForGroup(java.lang.String groupName,
boolean enabled)
Enabled/Disabled a set of action from this group name |
void |
setEnabledActionForId(java.lang.String id,
boolean enabled)
Enabled/Disabled an action from its id |
void |
setEnabledMenu(java.lang.String id,
boolean enabled)
Enabled/Disabled a complete menu for this name/id |
void |
setEnabledToolBarContentById(java.lang.String id,
boolean enabled)
Enabled/Disabled a toolbar content for this id |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String MENU_RECENT_PROJECT
public static final java.lang.String MENU_RECENT_FILE
public boolean treeModified
| Constructor Detail |
public InterfaceBuilder(java.net.URL input,
ActionBuilder builder)
throws InterfaceBuilderException
input - An URL for loading the descriptorbuilder - Update the default ActionBuilder by this one. This is useful when you
need a custom behavior for building each action object
InterfaceBuilderException - If the XML descriptor is a wrong one
public InterfaceBuilder(java.net.URL input)
throws InterfaceBuilderException
input - An URL for loading the descriptor
InterfaceBuilderException - If the XML descriptor is a wrong one| Method Detail |
public void buildUI(java.io.InputStream input)
throws InterfaceBuilderException
InterfaceBuilderExceptionpublic javax.swing.Icon getAppIcon()
public javax.swing.JMenuBar getMenuBar()
public void setEnabledActionForGroup(java.lang.String groupName,
boolean enabled)
public void setEnabledActionForId(java.lang.String id,
boolean enabled)
public boolean isEnabledActionForId(java.lang.String id)
public void setEnabledActionForAllGroup(boolean enabled)
public javax.swing.Action getActionById(java.lang.String id)
public javax.swing.JToolBar getToolBarByGroup(java.lang.String group)
public javax.swing.JToolBar getToolBarById(java.lang.String id)
public void setEnabledToolBarContentById(java.lang.String id,
boolean enabled)
public boolean hasPopup(java.lang.String id)
true if a popup if available for this name/idpublic javax.swing.JPopupMenu getPopup(java.lang.String id)
public void setActionClassAlias(java.lang.String alias,
java.lang.String className)
alias - The action class aliasclassName - The final action class namepublic java.lang.String getActionClassName(java.lang.String alias)
public boolean hasActionClassName(java.lang.String alias)
true if a classname is bound to this alias namepublic java.util.ArrayList getModel(java.lang.String id)
public javax.swing.JMenu getMenu(java.lang.String id)
public com.japisoft.fastparser.node.SimpleNode getMenuNode(java.lang.String id)
public void setEnabledMenu(java.lang.String id,
boolean enabled)
public boolean isApplicationDocumentModified()
true if the XML document has been modifiedpublic void setApplicationDocumentModified()
public void saveApplicationDocument()
throws InterfaceBuilderException
InterfaceBuilderException - If the operation is not possible
public void removeMenuItemForParam(java.lang.String menuId,
java.lang.String param)
public void insertMenuItemAtFirst(java.lang.String menuId,
javax.swing.Action a,
int limit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||