|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.UIManager
public class UIManager
A class to construct a user interface (menus and toolbars) from one or more UI definitions, which reference actions from one or more action groups. The UI definitions are specified in an XML format. See the GTK documentation of GtkUIManager for details of this class and the UI definitions XML format.
Constructor Summary | |
---|---|
UIManager()
|
Method Summary | |
---|---|
void |
addListener(UIManagerListener listener)
Register an object to handle spin events. |
void |
addUI(int mergeId,
java.lang.String path,
java.lang.String name,
java.lang.String action,
UIManagerItemType type,
boolean top)
|
int |
addUIFromFile(java.lang.String filename)
Parses a file containing a UI definition and merges it with the current contents of self. |
int |
addUIFromReader(java.io.Reader reader)
Parse the contents of a Reader that contains a UI definition and merges it with the current contents of self. |
int |
addUIFromString(java.lang.String ui)
Parses a string containing a UI definition and merges it with the current contents of self. |
void |
ensureUpdate()
|
AccelGroup |
getAccelGroup()
|
Action |
getAction(java.lang.String path)
|
java.util.List |
getActionGroups()
|
boolean |
getAddTearoffs()
|
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
Widget[] |
getToplevels(UIManagerItemType types)
|
java.lang.String |
getUI()
|
Widget |
getWidget(java.lang.String path)
|
void |
insertActionGroup(ActionGroup group,
int position)
|
int |
newMergeId()
|
void |
removeActionGroup(ActionGroup group)
|
void |
removeListener(UIManagerListener listener)
Removes a listener |
void |
removeUI(int mergeId)
Unmerges the part of this UIManager's content identified by mergeId. |
void |
setAddTearoffs(boolean addTearoffs)
|
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIManager()
Method Detail |
---|
public void setAddTearoffs(boolean addTearoffs)
public boolean getAddTearoffs()
public void insertActionGroup(ActionGroup group, int position)
public void removeActionGroup(ActionGroup group)
public java.util.List getActionGroups()
public AccelGroup getAccelGroup()
public Widget getWidget(java.lang.String path)
public Widget[] getToplevels(UIManagerItemType types)
public Action getAction(java.lang.String path)
public int addUIFromString(java.lang.String ui)
removeUI(int)
.
java.lang.RuntimeException
- If an error occurred adding the UI from the given String.public int addUIFromFile(java.lang.String filename)
removeUI(int)
.
java.lang.RuntimeException
- If an error occurred adding the UI from the given String.public int addUIFromReader(java.io.Reader reader) throws java.io.IOException
This method reads the contents of the Reader into a String and calls
addUIFromString(java.lang.String)
. You may be interested in using an
InputStreamReader here if your contents come from an
InputStream (such as when using
getClass().getResourceAsStream() or a URL).
removeUI(int)
.
java.lang.RuntimeException
- If an error occurred adding the UI from the given String.
java.io.IOException
- If there was an error reading the contents of the
reader.public void addUI(int mergeId, java.lang.String path, java.lang.String name, java.lang.String action, UIManagerItemType type, boolean top)
public void removeUI(int mergeId)
public java.lang.String getUI()
public void ensureUpdate()
public int newMergeId()
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class GObject
public EventType getEventType(java.lang.String signal)
getEventType
in class GObject
public void addListener(UIManagerListener listener)
SpinListener
public void removeListener(UIManagerListener listener)
addListener(UIManagerListener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |