jas2.util.xmlmenus
Class XMLMenuBuilder
- java.lang.Object
-
- jas2.util.xmlmenus.XMLMenuBuilder
-
public class XMLMenuBuilder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classXMLMenuBuilder.BadXMLExceptionException to throw when the result of bad XML (something that should not have gotten past a validating parser) is encountered.static classXMLMenuBuilder.IllegalDefaultClassExceptionException to throw when the client programmer tries to set a default class of something to be a class that cannot be upcast to the thing's current default class.
-
Constructor Summary
Constructors Constructor and Description XMLMenuBuilder(java.io.Reader in, java.lang.String fileName)Create am XMLMenuBuilder by reading an XML file
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description javax.swing.JMenuBargetMenuBar(java.lang.String id)get the menu bar(and its contents) with ID idjavax.swing.JPopupMenugetPopupMenu(java.lang.String id)get the popup menu (and its contents) with ID idjavax.swing.JToolBargetToolBar(java.lang.String id)get the tool bar (and its contents) with ID idvoidsetDefaultCheckboxMenuItemClass(java.lang.Class klass)sets the default class of checkbox menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultImageIconClass(java.lang.Class klass)sets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultMenuBarClass(java.lang.Class klass)sets the default class of menubars to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultMenuClass(java.lang.Class klass)sets the default class of menus to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultMenuItemClass(java.lang.Class klass)sets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultMenuSeparatorClass(java.lang.Class klass)sets the default class of menu separator items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultPopupCheckboxMenuItemClass(java.lang.Class klass)sets the default class of popup checkbox menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultPopupMenuClass(java.lang.Class klass)sets the default class of popup menus to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultPopupMenuItemClass(java.lang.Class klass)sets the default class of popup menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultPopupMenuSeparatorClass(java.lang.Class klass)sets the default class of popup menu separator items to be klass, which MUST be the default class specified in the constructorr or one of its subclassesvoidsetDefaultPopupRadioMenuItemClass(java.lang.Class klass)sets the default class of popup radio menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultRadioMenuItemClass(java.lang.Class klass)sets the default class of radio menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultToolBarClass(java.lang.Class klass)sets the default class of toolbars to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultToolBarItemClass(java.lang.Class klass)sets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclassesvoidsetDefaultToolBarSeparatorClass(java.lang.Class klass)sets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses
-
-
-
Constructor Detail
-
XMLMenuBuilder
public XMLMenuBuilder(java.io.Reader in, java.lang.String fileName) throws JASDOMParser.JASXMLExceptionCreate am XMLMenuBuilder by reading an XML file- Parameters:
in- The XML inputfileName- The file name (for error messages)- Throws:
JASDOMParser.JASXMLException
-
-
Method Detail
-
setDefaultMenuBarClass
public void setDefaultMenuBarClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menubars to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultMenuClass
public void setDefaultMenuClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menus to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultMenuItemClass
public void setDefaultMenuItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultRadioMenuItemClass
public void setDefaultRadioMenuItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of radio menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultCheckboxMenuItemClass
public void setDefaultCheckboxMenuItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of checkbox menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultMenuSeparatorClass
public void setDefaultMenuSeparatorClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menu separator items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultPopupMenuClass
public void setDefaultPopupMenuClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of popup menus to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultPopupMenuItemClass
public void setDefaultPopupMenuItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of popup menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultPopupRadioMenuItemClass
public void setDefaultPopupRadioMenuItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of popup radio menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultPopupCheckboxMenuItemClass
public void setDefaultPopupCheckboxMenuItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of popup checkbox menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultPopupMenuSeparatorClass
public void setDefaultPopupMenuSeparatorClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of popup menu separator items to be klass, which MUST be the default class specified in the constructorr or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultToolBarClass
public void setDefaultToolBarClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of toolbars to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultToolBarItemClass
public void setDefaultToolBarItemClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultToolBarSeparatorClass
public void setDefaultToolBarSeparatorClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
setDefaultImageIconClass
public void setDefaultImageIconClass(java.lang.Class klass) throws XMLMenuBuilder.IllegalDefaultClassExceptionsets the default class of menu items to be klass, which MUST be the default class specified in the constructor or one of its subclasses- Parameters:
klass- the new default class- Throws:
XMLMenuBuilder.IllegalDefaultClassException
-
getMenuBar
public javax.swing.JMenuBar getMenuBar(java.lang.String id)
get the menu bar(and its contents) with ID id
-
getToolBar
public javax.swing.JToolBar getToolBar(java.lang.String id)
get the tool bar (and its contents) with ID id
-
getPopupMenu
public javax.swing.JPopupMenu getPopupMenu(java.lang.String id)
get the popup menu (and its contents) with ID id
-
-
DataMelt 3.0 © DataMelt by jWork.ORG