|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.richtext.uiimpl.MenuBuilder | +--com.ibm.richtext.swingui.SwingMenuBuilder
SwingMenuBuilder provides a method for creating a set of Swing menus for interacting with an MTextPanel. Future versions of this class may provide greater control over the menu contents.
MTextPanel
Field Summary | |
static int |
ABOUT
Id for a menu with an About item. |
static int |
BIDI
Id for a menu that sets the primary run direction for a paragraph. |
static int |
EDIT
Id for an Edit menu. |
static int |
FLUSH
Id for a paragraph alignment menu. |
static int |
KEYMAP
Id for a menu that sets the KeyRemap on an MTextPanel. |
static int |
SIZE
Id for the point sizes menu. |
static int |
STYLE
Id for a Style menu. |
Fields inherited from class com.ibm.richtext.uiimpl.MenuBuilder |
defaultMenus, fDialogParent, fTextPanel |
Method Summary | |
protected com.ibm.richtext.uiimpl.DialogItem.DialogFactory |
createAboutDialogFactory()
|
void |
createMenus(javax.swing.JMenuBar menuBar,
MTextPanel textPanel,
java.awt.Frame frame)
Add a standard set of menus to the given menu bar. |
void |
createMenus(javax.swing.JMenuBar menuBar,
MTextPanel textPanel,
java.awt.Frame frame,
int[] menus)
Add a set of menus to the given menu bar. |
protected com.ibm.richtext.uiimpl.DialogItem.DialogFactory |
createNumberDialogFactory(java.lang.String dialogTitle,
java.lang.String dialogMessage,
java.lang.Object key,
boolean character)
|
protected com.ibm.richtext.uiimpl.DialogItem.DialogFactory |
createObjectDialogFactory(java.lang.String dialogTitle,
java.lang.String dialogMessage,
java.lang.Object key,
boolean character,
java.lang.String[] names,
java.lang.Object[] values)
|
static SwingMenuBuilder |
getInstance()
Return an instance of SwingMenuBuilder. |
protected void |
handleAddMenu(java.lang.String key)
|
Methods inherited from class com.ibm.richtext.uiimpl.MenuBuilder |
doCreateMenus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EDIT
public static final int SIZE
public static final int STYLE
WEIGHT
,
POSTURE
,
UNDERLINE
and
STRIKETHROUGH
attributes from the
current selection{WEIGHT,WEIGHT_BOLD}
to
the current selection{POSTURE,POSTURE_ITALIC}
to
the current selection{UNDERLINE,UNDERLINE_ON}
to
the current selection{STRIKETHROUGH,STRIKETHROUGH_ON}
to the current selectionpublic static final int FLUSH
public static final int KEYMAP
public static final int BIDI
public static final int ABOUT
Method Detail |
public static SwingMenuBuilder getInstance()
public void createMenus(javax.swing.JMenuBar menuBar, MTextPanel textPanel, java.awt.Frame frame)
menuBar
- the MenuBar to which menus are addedtextPanel
- the MTextPanel with which the menus interactframe
- a Frame to use as the parent of any dialogs created by a
a menu item. If null, menu items which create dialogs will be omitted.public void createMenus(javax.swing.JMenuBar menuBar, MTextPanel textPanel, java.awt.Frame frame, int[] menus)
menuBar
- the MenuBar to which menus are addedtextPanel
- the MTextPanel with which the menus interactframe
- a Frame to use as the parent of any dialogs created by a
a menu item. If null, menu items which create dialogs will be omitted.menus
- an array of integer menu id's. Each element of the
array must be one of this class's menu id constants. If null,
the default menus are created.protected void handleAddMenu(java.lang.String key)
handleAddMenu
in class com.ibm.richtext.uiimpl.MenuBuilder
protected com.ibm.richtext.uiimpl.DialogItem.DialogFactory createObjectDialogFactory(java.lang.String dialogTitle, java.lang.String dialogMessage, java.lang.Object key, boolean character, java.lang.String[] names, java.lang.Object[] values)
createObjectDialogFactory
in class com.ibm.richtext.uiimpl.MenuBuilder
protected com.ibm.richtext.uiimpl.DialogItem.DialogFactory createNumberDialogFactory(java.lang.String dialogTitle, java.lang.String dialogMessage, java.lang.Object key, boolean character)
createNumberDialogFactory
in class com.ibm.richtext.uiimpl.MenuBuilder
protected com.ibm.richtext.uiimpl.DialogItem.DialogFactory createAboutDialogFactory()
createAboutDialogFactory
in class com.ibm.richtext.uiimpl.MenuBuilder
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |