public class MenuEntry extends MenuNode
MenuNode.FontStyle
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_ICON, DEFAULT_TITLE, myDefaultFont, myMenuDefaultFont
Constructor and Description |
---|
MenuEntry() |
MenuEntry(java.lang.String title) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(int idx,
MenuNode node) |
void |
addChild(MenuNode node) |
void |
buildJMenu(ModelScriptMenu modelMenu) |
void |
clearChildren() |
int |
compareTo(MenuNode o) |
boolean |
equals(MenuNode node) |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
MenuNode |
getChild(int idx) |
java.util.ArrayList<MenuNode> |
getChildren() |
javax.swing.JMenu |
getComponent() |
int |
getMaxRows() |
java.lang.String |
getPrefix(java.util.ArrayList<java.lang.String> array)
Given a list of strings, finds the greatest common prefix
|
void |
invalidateMenu() |
void |
invalidateMenusToRoot()
Invalidate the menu for this MenuEntry, along with the menus of all its
ancestors.
|
boolean |
isExpandable() |
boolean |
isMenuValid() |
boolean |
isScrolling() |
void |
moveChild(MenuNode node,
int shift) |
int |
numChildren() |
boolean |
removeChild(MenuNode node) |
void |
set(MenuEntry menuEntry) |
void |
setExpandable(boolean set) |
void |
setJMenu(javax.swing.JMenu menu) |
void |
setMaxRows(int max) |
void |
setScrolling(boolean set) |
void |
shiftChildren(int minIdx,
int maxIdx,
int shift) |
void |
sortMenu(MenuEntry root,
java.util.Comparator<MenuNode> comparer) |
boolean |
treeEquals(MenuNode menuNode)
Check that this node and its children are equal to another node and its
children.
|
java.awt.Component |
updateComponent(ModelScriptMenu modelMenu) |
getFont, getFontName, getFontSize, getFontSpec, getFontStyle, getFontStyle, getIcon, getIndex, getParent, getProperty, getTitle, getType, set, setFont, setFontName, setFontSize, setFontSpec, setFontStyle, setIcon, setTitle, titleIsEmpty, toString
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class MenuNode
public void setMaxRows(int max)
public int getMaxRows()
public void setScrolling(boolean set)
public boolean isScrolling()
public void setExpandable(boolean set)
public boolean isExpandable()
public int compareTo(MenuNode o)
public void set(MenuEntry menuEntry)
public javax.swing.JMenu getComponent()
getComponent
in class MenuNode
public void invalidateMenu()
public void invalidateMenusToRoot()
public boolean isMenuValid()
public java.awt.Component updateComponent(ModelScriptMenu modelMenu)
updateComponent
in class MenuNode
public void setJMenu(javax.swing.JMenu menu)
public void buildJMenu(ModelScriptMenu modelMenu)
public int numChildren()
numChildren
in class MenuNode
public MenuNode getChild(int idx)
public java.util.ArrayList<MenuNode> getChildren()
public void addChild(MenuNode node)
public void addChild(int idx, MenuNode node)
public boolean removeChild(MenuNode node)
public void shiftChildren(int minIdx, int maxIdx, int shift)
public void moveChild(MenuNode node, int shift)
public void clearChildren()
public boolean treeEquals(MenuNode menuNode)
public java.lang.String getPrefix(java.util.ArrayList<java.lang.String> array)
array
- input array of strings