Java Drawing DrawTop

Language

JP  US  UK

 

Command Dispatcher

 H. Jyounishi, Tokyo Japan
 

Frame (Index), No frame                 version:0.3(latest)  

1. Overview
Summary:This page describes the function which defines a command, dispatches the command and shows a popup menu.
Classes on this page: Command, ExecCommand, ExecCommsandUtil, ExecPopupMenu
Important issues: The list of command dispatch, The forced termination of the CreateShapeLS


2. Class Commandreturn=>page top
Class
Description
Command
∙ This class defines a command object which consistes of commandId, id of calling source (callFrom) and parameters (params).
ExecCommand
∙ This class dispatches the command.
ExecCommandUtil
∙ This class is a collection of methods used in ExecCommand.
ExecPopupMenu
∙ This class shows the popup menue.
Field
Description
commandId
int commandId
Command Id.
callFrom
int callFrom
This field represents the type of the object issuing the command.
params
Object[] params
The command parameters.

Static field
Description
NEW,
OPEN
,
SAVE
,
SAVEAS

public final static int NEW: File new.
public final static int OPEN: File open.
public final static int SAVE: File save.
public final static int SAVEAS: File save as.
PAGE,
NEXT_PAGE,
PREVIOUS_PAGE,
LAST_PAGE,
TOP_PAGE,
INSERT_NEW_PAGE,
DELETE_PAGE
,
PAGE_SETUP,
PAGE_LAYOUT

public final static int PAGE: Page.
public final static int NEXT_PAGE: Shows the next page.
public final static int PREVIOUS_PAGE: Shows the previous page.
public final static int LAST_PAGE: Shows the last page.
public final static int TOP_PAGE: Shows the top page.
public final static int INSERT_NEW_PAGE: Inserts a new page.
public final static int DELETE_PAGE: Deletes the current page.
public final static int PAGE_SETUP: Page setup.
public final static int PAGE_LAYOUT: Page layout.
PRINT,
EXIT

public final static int PRINT: Print.
public final static int EXIT: Exit.
EDIT,
CUT
,
COPY
,
PASTE,
DEL
,
SELECT_ALL

public final static int EDIT: Edit
public final static int CUT: Cut (shape/text object)
public final static int COPY: Copy (shape/text object)
public final static int PASTE: Paste (shape/text object)
public final static int DEL: Delete (shape/text object)
public final static int SELECT_ALL: Select all shape objects
UNDO,
REDO

public final static int UNDO: Undo
public final static int REDO: Redo
CLICKEDPOINT,
SELECTION

public final static int CLICKEDPOINT: Clicks on the canvas.
public final static int SELECTION: Selects shapes
SHAPE,
TEXT_BOX
,
RECTANGLE,
ROUND_RECTANGLE
,
ELLIPSE,
IMAGE
,
COMPONENT_SHAPE

public final static int SHAPE: Creates a shape
public final static int TEXT_BOX: Creates a text box
public final static int RECTANGLE: Creates a rectangle
public final static int ROUND_RECTANGLE: Creates a round rectangle
public final static int ELLIPSE: Creates an ellipse
public final static int IMAGE: Creates an image
public final static int COMPONENT_SHAPE: Creates a component shape
LINE,
ARROW
,
DOUBLE_ARROW
,
POLYLINE,
CUBIC_CURVE
,
GENERAL_CURVE
,
AUTO_SHAPE_FIRST,
AUTO_SHAPE_LAST
public final static int LINE: Creates an line
public final static int ARROW: Creates an arrow line
public final static int DOUBLE_ARROW: Creates a double arrow line
public final static int POLYLINE: Creates a polyline
public final static int CUBIC_CURVE: Creates a cubic curve
public final static int GENERAL_CURVE: Creates a generalized curve
public final static int AUTO_SHAPE_FIRST: First number of creating a shape command
public final static int AUTO_SHAPE_LAST: Last number of creating a shape command
AUX,
CENTER_LINE,
LINE_BISECTOR,
ANGLE_BISECTOR
public final static int AUX:
public final static int CENTER_LINE:
public final static int LINE_BISECTOR:
public final static int ANGLE_BISECTOR:
LIB public final static int LIB: Shows the dialog of the component library.
MOVE,
RESIZE
,
MOVE_ENDPT

public final static int MOVE: Move shapes.
public final static int RESIZE: Resize shapes.
public final static int MOVE_ENDPT: Move endpoint of a line/curve.
UTIL,
ADD_TEXT_BOX,
DELETE_TEXTBOX,
TRANSLATE,
ROTATE,
FLIP,
CUT_SHAPE,
CONNECT_CURVES

public final static int UTIL: Utility
public final static int ADD_TEXT_BOX: Adds text box to a shape object.
public final static int DELETE_TEXTBOX:
public final static int TRANSLATE: Translates shapes.
public final static int ROTATE: Rotates shapes.
public final static int FLIP: Flip shapes (mirror transform).
public final static int CUT_SHAPE: Cuts shapes by other shapes.
public final static int CONNECT_CURVES: Connects curves.
MODIFY_SHAPE,
MOVE_POINT,
MOVE_EDGE,
ADD_POINT,
DELETE_POINT

public final static int MODIFY_SHAPE: Modifies a shape
public final static int MOVE_POINT: Moves a segment junction point of a polyline/curve
public final static int MOVE_EDGE: Moves a edge (line segment) of a polyline
public final static int ADD_POINT: Adds a segment junction point to a polyline/curve
public final static int DELETE_POINT: Deletes a segment junction point from a polyline/curve
SETTING,
AUTO_ALIGN,
ENABLE_CONNECTOR, FREE_DIRECTION,
KEEP_XY_DIRECTION
,
KEEP_DIRECTION,
TO_NEAREST_PT, DRAW_NODE_POINTS,
KEEP_TEMP_SHAPES,
CLEAR_ALL_TEMP_SHAPES

public final static int SETTING: Sets a condition parameter.
public final static int AUTO_ALIGN: Enables the auto Aligns function.
public final static int ENABLE_CONNECTOR: Enables the connector function.
public final static int FREE_DIRECTION: Connector auto tracking option.
public final static int KEEP_XY_DIRECTION: Connector auto tracking option.
public final static int KEEP_DIRECTION:
public final static int TO_NEAREST_PT:
public final static int DRAW_NODE_POINTS: Displays marks on the segment junction points of a polyline/piecewise cubic curve.
SHAPE_FORMAT,
DRAW_PANEL_INFORMATION

public final static int SHAPE_FORMAT: Shows the information of a shape format on the dialog.
public final static int DRAW_PANEL_INFORMATION: Shows the information of the draw panel on the dialog.
FONT,
FONT_FAMILY,
FONT_SIZE,
BOLD,
ITALIC,
UNDERLINE,
SUBSCRIPT,
SUPERSCRIPT
,
FONT_COLOR

public final static int FONT: Specifies font attributes.
public final static int FONT_FAMILY: Specifies font family.
public final static int FONT_SIZE: Specifies font size.
public final static int BOLD: Specifies bold/plain.
public final static int ITALIC: Specifies italic/regular.
public final static int UNDERLINE: Specifies underline.
public final static int SUBSCRIPT: Specifies subscript.
public final static int SUPERSCRIPT: Specifies superscript.
public final static int FONT_COLOR: Specifies font color.
TEXTBOX_LAYOUT public final static int TEXTBOX_LAYOUT: Specifies the layout of a text box.
TEXT_ALIGN,
TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT

public final static int TEXT_ALIGN: Specifies text Aligns.
public final static int TEXT_ALIGN_LEFT: Align left.
public final static int TEXT_ALIGN_CENTER: Align center.
public final static int TEXT_ALIGN_RIGHT: Align right.
FILL_COLOR,
LINE_COLOR,
LINE_WIDTH,
LINE_STROKE,
ARROW_STYLE

public final static int FILL_COLOR: Specifies fill color of shapes.
public final static int LINE_COLOR: Specifies line color of shapes' boundaries.
public final static int LINE_WIDTH: Specifies line width of shapes' boundaries.
public final static int LINE_STROKE: Specifies line stroke of shapes' boundaries.
public final static int ARROW_STYLE: Specifies arrow style of lines or polylines.
Z_ORDER,
MOVE_TO_FRONT,
MOVE_TO_BACK,
MOVE_FORWARD,
MOVE_BACKWARD
public final static int Z_ORDER: Specifies z order of shapes.
public final static int MOVE_TO_FRONT: Move shapes to front.
public final static int MOVE_TO_BACK: Move shapes to back.
public final static int MOVE_FORWARD: Move shapes forward.
public final static int MOVE_BACKWARD: Move shapes backward.
ALIGN,
ALIGN_LEFT,
ALIGN_CENTER,
ALIGN_RIGHT,
ALIGN_TOP,
ALIGN_MIDDLE,
ALIGN_BOTTOM

public final static int ALIGN: Aligns shapes.
public final static int ALIGN_LEFT: Align shapes left.
public final static int ALIGN_CENTER: Align shapes center.
public final static int ALIGN_RIGHT: Aligns shapes right.
public final static int ALIGN_TOP: Aligns shapes top.
public final static int ALIGN_MIDDLE: Aligns shapes middle.
public final static int ALIGN_BOTTOM: Aligns shapes bottom.
GROUP, UNGROUP
public final static int GROUP: Groups shapes
public final static int UNGROUP: Ungroups shapes
ZOOM, ZOOM_TO
public final static int ZOOM: Shows the zoom dialog.
public final static int ZOOM_TO: Sets scale factor and displays shapes.
DEBUG,
TEST,
GEOMTEST,
DRAW_BOUNDING_BOX,
DRAW_CHARACTERISTIC_PT, DRAW_TEXTLAYOUT_BOUND, ONNECTION_TEST

public final static int DEBUG: Specifies debug type.
public final static int TEST: Specifies test.
public final static int GEOMTEST: Specifies the test of geometric codes.
public final static int DRAW_BOUNDING_BOX: Draws bounding boxes of shapes.
public final static int DRAW_CHARACTERISTIC_PT: Draws characteristic points of shapes.
public final static int DRAW_TEXTLAYOUT_BOUND: Draws text bounds of text boxes.
public final static int CONNECTION_TEST:
DRAWPANEL_POPUP_MENU,
SHAPE_POPUP_MENU,
GROUP_POPUP_MENU

public final static int DRAWPANEL_POPUP_MENU: Type of the popup menu
public final static int SHAPE_POPUP_MENU: Type of the popup menu
public final static int GROUP_POPUP_MENU: Type of the popup menu
ORIGINAL_TYPE,
ENABLE_RESIZING
KEEP_ASPECT_RATIO
KEEP_LINE_DIRECTION
KEEP_CONNECTOR_CONNECTIONS
ENABLE_UNGROUPING
public final static int ORIGINAL_TYPE
public final static int ENABLE_RESIZING
public final static int KEEP_ASPECT_RATIO
public final static int KEEP_LINE_DIRECTION
public final static int KEEP_CONNECTOR_CONNECTIONS
public final static int ENABLE_UNGROUPING
ABORT_COMMAND
public final static int ABORT_COMMAND: Aborts the command.
commandString
static String[] commandString =new String[200]
Array of the strings representing the commands which are set by the setCommandString method.
NORMAL_MODE
CREATING_MODE
MOVING_MODE,
RESIZING_MODE,
MOVING_ENDPT_MODE,
MODIFYING_SHAPE_MODE

(mode)
public static final int NORMAL_MODE=0: normal mode
public static final int CREATING_MODE=1: Creating a shape mode.
public static final int MOVING_MODE=2; Moving mode.
public static final int RESIZING_MODE=3; Resizing mode.
public static final int MOVING_ENDPT_MODE=4; Moving end point.
public static final int MODIFYING_SHAPE_MODE=5: Modifying a shape mode.
modeString
public static final String[] modeString=new String[10];
Array of the strings representing the modes.
callFromMenu, callFromMousePositionLS, callFromSelectionLS,
callFromMouseListene,
callFromDialog

(callFrom)
public static final int callFromMenu
public static final int callFromMousePositionLS
public static final int callFromSelectionLS
public static final int callFromMouseListener
public static final int callFromDialog

These numbers shows the object issuing a command.
callFromString
final static String[] callFromString
Array of the strings representing the callFromXXX.

Method
Description
Constructor
public Command()
Calls setCommandString method for initial setting.
Constructor
public Command(int commandId, int callFrom, Object[] params)
Creates a Command object and sets the parameters to corresponding fields (commandId, callFrom, params).
getCommandId
public int getCommandId()
Returns the commandId.
getCallFrom
public int getCallFrom()
Returns the callFrom.
getParams
public Object[] getParams()
Returns the params.
toString
public String toString()
Returns the string representing this object.
setCommandStrings
(static)
private static void setCommandStrings()
Sets the command strings for all the command Id by calling setCommandString method.
setCommandString
(static)
private static void setCommandString(int commandId, String command)
Sets the command string for the commandId.
getCommandString
(static)
public static String getCommandString(int commandId)
Returns the command string. If the command string is undefined, then return null.
getCommandLowerString
(static)
public static String getCommandLowerString(int commandId)
Returns the command string whose characters are converted to lower-case with replacing "_" with " ". If the command string is undefined, then return null.
getCallFromString
(static)
public static String getCallFromString(int callFrom)
Returns the callFrom string. If the command string isn't defined, then return null.
getModeString
(static)
public static String getModeString(int modeId)
Returns the mode string. If the mode string is undefined, then return null.
getCommandId
(static)
public static int getCommandId(String command)
Returns the command Id whose command string matches to the parameter.
The matching the parameter with the command string ignores the difference of upper-case characters or lower-case characters and the difference of "_" or " ".
Returns -1, if the parameter doesn't match to any of the command strings (commandString).
compareStrings
(static)
public static boolean compareStrings(String str1, String str2)
Returns true if the str1 equals the str2 ignoring the difference of " ", "_" and ".".


3. Class ExecCommand return=>page top
Dispatch a command by exec method of this class.

Field
Description
currentCommandId
private int currentCommandId
Sets the current command Id.
previousCommandId
private int previousCommandId
Sets the previous command Id.
activeCreateShapeLS
public CreateShapeLS activeCreateShapeLS
Sets the activated CreateShapeLS object. This field is used for cancelling the activated CreateShapeLS object.
=>The forced termination of the CreateShapeLS
clickedPoint
Point2D clickedPoint
Sets the clicked point. Currently, this field is referred to specify the paste position (getPastePosition method of the Edit). This field is set by the CLICKEDPOINT command generated by the prepareClickedPointCommand method of the SelectionLS.

Method
Description
exec
public void exec(Command command)
Gets the commandId from the parameter and dispatches the command.
=>The list of command dispatch
∙ If the "creating a shape" command didn't performed normally, then aborts the "creating a shape" command.
=>The forced termination of the CreateShapeLS
getCurrentCommandId
public int getCurrentCommandId()
Returns the currentCommandId.
setCurrentCommandId
pupublic void setCurrentCommandId(int commandId)
Sets the parameter to the currentCommandId.
getPreviousCommandId
public int getPreviousCommandId()
Returns the previousCommandId.
setPreviousCommandId
public void setPreviousCommandId(int commandId)
Sets the parameter to the previousCommandId.
getClickedPoint
public Point2D getClickedPoint()
Returns the clickedPoint.

: The forced termination of the CreateShapeLS
(1)Problem

When a shape button is clicked on the toolbar, the creatingStart method of the CreateShapeLS registers the the CreateShapeLS to the ListenerPanel as a MouseListener and MouseMotionListener. Then the CreateShapeLS r eceives the mouse motion and creates a shape object. And when the CreateShapeLS ends normally or abnormally, the creatingEnd method removes the CreateShapeLS from the ListenerPanel. This is the outline of creating a shape process (=> CreateShapeLS Control flow).

What happens if a shape button is clicked and then other button is clicked continuously without the mouse drag or mouse click?
In this case, the CreateShapeLS remains on the ListenerPanel as a MouseListener and MouseMotionListener, and it may cause unnecessary operations. So, the CreateShapeLS must be terminated forcibly.


(2)Forced termination of the MouseListener and MouseMotionListener

To terminate the CreateShapeLS forcibly, the variable activeCreateShapeLS is set up in the ExecCommand and the abort method is implemented in the CreateShapeLS. When a shape button is clicked, the CreateShapeLS object is assigned to the activeCreateShapeLS. On the other hand, the exec method of the ExecCommand always checks whether the activeCreateShapeLS is null or not. If not and the current command is unrelated to the previous shape creating command, then calls the abort method and assigns null to the activeCreateShapeLS.

=> Also see CreateShapeLS Serious errors in CreatShapeLS


4. Class ExecCommandUtil return=>page top
Dispatch a command by exec method of this class.
Field
Description
containerManager
ContainerManager containerManager = ObjectTable.getContainerManager("");
drawPanel
DrawPanel drawPanel = ObjectTable.getDrawPanel("");
selectionLS SelectionLS selectionLS = ObjectTable.getSelectionLS("");

Method
Description
addTextBox public void addTextBox(ShapeContainer[] containers)
Parameters:
containers - ShapeContainer objects.
Processing:
Calls the ShapeContainer.addTextBox and sets undo setting for the operation.
deleteTextBox public void deleteTextBox(ShapeContainer[] containers)
Parameters:
containers - ShapeContainer objects.
Processing:
Calls the ShapeContainer.deleteTextBox and sets undo setting for the operation.
checkTextBox private int checkTextBox(ShapeContainer[] containers, String operation)
Parameters:
containers - ShapeContainer objects.
operation - "add", "delete" and so on.
Processing:
This method is called addTextBox and deleteTextBox methods of this class to check whether each of the containers is suitable to have a text box or not.
setFontStyle
public void setFontStyle(FontStyle fontStyle)
This method calls the setFontStyle method of the TextBox.
: This method does the undo setup.
setTextBoxLayout
public void setTextBoxLayout(Insets textBoxInsets, int textAlign, double lineSpace)
Parameters:
textBoxInsets - This parameter corresponds to textBoxInsets the TextBox.
textAlign - This parameter corresponds to textAlign the TextBox.
lineSpace - This parameter corresponds to lineSpace the TextBox.
Processing:
This method calls the setTextBoxLayout method of the TextBox.
: This method does the undo setup.
moveZorder
public void moveZorder(int mode)
Parameters:
mode=0 - move to front
mode=1 - move to back
mode=2 - move foreward
mode=3 - move backward
Processing:
Changes the Z order of the selected shapes by using the addContainer, deleteContainer and swapContainers methods of the ContainerManager
:This method does the undo setup.
aligns
public void aligns(int mode)
Parameters:
mode=0 - Aligns_left
mode=1 - Aligns_center
mode=2 - :Aligns_right
mode=3 - Aligns_top
mode=4 - Aligns_middle
mode= 5 - Aligns_bottom
Processing:
Aligns the selected shapes by the resizeContainer method of the ConnectionUtil.
: The undo setup is done in the resizeContainer method.


5. Class ExecPopupMenu return=>page top
Showing the popup menu

Press the mouse right button, then the popup menu will be shown. The type of the popup menu is depend on the location where the mouse right button is pressed.
∙ On a single shape object or its boundary -> The ShapePopupMenu will be shown.
∙ On a group object or the boundaries of the grouped shapes -> The GroupPopupMenu will be shown.
∙ On the empty place -> The DrawPanelPopupMenu will be shown.
The DrawPanelPopupMenu shows the list of the shape objects or the mouse listeners on the ListenerPanel, mainly for debug.


Processing procedure
Here we explain the processing procedure of displaying a dialog of the DialogOfShapeFormat (Figure 5.1(d)), when we press down the right mouse button on a shape or the drawing panel.

Step1. Press down the right mouse button a shape or the DrawPanel.
Calls the ExecPopupMenu.show from the SelectionLS or MousePositionLS.

Step2. ExecPopupMenu
Calls the ExecPopupMenu.show method to classify its menutype by this.getCase method, sets the menu items to the pop up menu and calls the PopupPulldownMenu.show method to displays the pop up menus(Figure 5.1(a)-(c)).

Step3. PopupPulldownMenu
Calls the createDrawPanelPopupMenu, createSingleShapePopupMenu, createGroupShapePopupMenu or createTextBoxPopupMenu method to show the pop up menu accordding to the menutype(0-3) determined in Step3.

Step4. PopupMenuAction
This class is the action processing class of the PopupPulldownMenu. Its actionPerformed method creates a command which command Id is Command.SHAPE_FORMAT and calls the ExecCommand.exec.

Step5. ExecCommand
The exec method dispatches the passed command to the case Command.SHAPE_FORMAT, and calls the DialogOfShapeFormat.showDialog (Figure 5.1(d)).
=> Triggering popup menu in Popup menu

(a)clicks the right mouse button on the selected shape.
(b)Selects a text box of a shape and clicks the right mouse button. (c)Clicks the right mouse button on the display panel. (d)DialogOfShapeFormat
dialog
Figure 5.1 The pop up menu and the shape Format dialog (DialogOfShapeFormat)

Field
Description
selectedContainer
ShapeContainer selectedContainer
The selected shape object (ShapeContainer). If the mouse button is pressed on the empty place, then assigns null to this field. This field is set by the getCase method.

Method
Description
show
public void show(MouseEvent e)
The popup menu is shown according to the returned value (menuType) of the getCase method.
∙ menuType=0

Gets the PopupPulldownMenu whose command name is "DRAWPANEL_POPUP_MENU" by the getMenuComponent method of the MenuUtil and calls the show method of the PopupPulldownMenu.


∙ menuType=1

Gets the PopupPulldownMenu whose command name is "SHAPE_POPUP_MENU" and calls the show method. According to the type of the selected shape, sets "enable/disable" to some of the menu items of the PopupPulldownMenu.

Round rectangle Line Text box

∙ menuType=2

Gets the PopupPulldownMenu whose command name is "GROUP_POPUP_MENU" and calls the show method.

getCase

private int getCase()

Returns:
Returns the mouse hit information.
0 - The mouse hits nothing.
1 - The mouse hits a single shape object.
2 - The mouse hits a group shape object.
3 - The mouse hits a text box of a single/group shape object.

Processing:

Gets the MousePositionInfo object by the getMousePositionInfoForSelection method of the MousePositionLS and returns the code.



6.The list of command dispatch return=>page top
Command
Description
File
(NEW, OPEN, SAVE, SAVE, SAVEAS)
Calls the FileIo.fileNew, FileIo.fileOpen, FileIo.fileSave or FileIo.fileSaveAs method.
Page setup
(NEXT_PAGE, PREVIOUS_PAGE,
INSERT_NEW_PAGE, DELETE_PAGE,
PAGE_SETUP, PAGE_LAYOUT)
The command is specified by the item of the pull down menu or the button.
∙ Specified by the pulldown menu of "Page"

The action command of the selected menu item is passed by the parameter (params). So dispatches by the action command and calls the corresponding method such as pageManager.showNextPage, pageManager.showPreviousPage, ........., DialogOfPageSetup.showDialog or DialogOfPageLayout.showDialog.

∙ Specified by the buttons.

Dispatches the PREVIOUS_PAGE, INSERT_NEW_PAGE or DELETE_PAGE command by the commandId.

Print
(PRINT)
Calls the FileIo.printOut method.
Editing
(CUT, COPY, PASTE, DELETE,
SELECT_ALL)
The command is specified by the item of the pull down menu or the button.
Calls Edit.cut, Edit.copy, Edit.paste or Edit.delete method. For SELECT_ALL, gets all the ShapeContainer objects and calls their setSelected(true) methods.
undo, redo
(UNDO, REDO)
Calls the undo or redo of the UndoDrawManager.
Creating shape
(TEXT_BOX, RECTANGLE,
ROUND_RECTANGLE, ELLIPSE, LINE,
ARROW, DOUBLE_ARROW, POLYLINE,
CUBIC_CURVE, COMPONENT_SHAPE)
Creates the new CreateShapeLS object and calls its creatingStart method.
=> CreateShapeLS Control flow of creating a shape, Serious errors in CreatShapeLS
Component library
(LIB)
Create a new ComponentLibDialog object and calls the showDialog method.
Moving/Resizing shape
(MOVE, RESIZE)
This command is issued by the prepareMoveResizeCommand method of the SelectionLS.
=>Control flow of moving/resizing
And the resize command is also issued by the ShapeFormatAction which perform the action of the DialogOfShapeFormat object. In this case, calls the resizeContainer method of the ConnectionUtil.
Add text box
/Delete Text box /
Manipulating shape

(ADD_TEXT_BOX, DELETE_TEXT_BOX,
TRANSLATE, ROTATE,
FLIP, MODIFY_SHAPE, CUT_SHAPE,
CONNECT_CURVES)
Calls the following methods.
∙ ADD_TEXT_BOX: Calls the ShapeContainer.addTextBox through ExecCommandUtil.addTextBox method.
∙ DELETE_TEXT_BOX: Calls the ShapeContainer.deleteTextBox method through ExecCommandUtil.deleteTextBox method
∙ TRANSLATE: Creates a new Translate object and calls the showDialog method.
∙ ROTATE: Creates a new Rotate object and calls the showDialog method.
∙ FLIP: Creates a new Flip object and calls the showDialog method.
∙ MODIFY_SHAPE: Creates a new ModifyShape object and calls the showDialog method.
∙ CUT_SHAPE: Creates a new CutShape object and calls the showDialog method.
∙ CONNECT_CURVES: Creates a new ConnectCurves object and calls the showDialog method.
Setting
(AUTO_ALIGN, ENABLE_CONNECTOR,
DRAW_NODE_POINTS)
Sets the states of the menu items to the corresponding fields of the Drawparameters.
Information
(SHAPE_FORMAT,
DRAW_PANEL_INFORMATION)
Calls the following methods.
∙ SHAPE_FORMAT: Creates a new DialogOfShapeFormat object and calls the showDialog method.
∙ DRAW_PANEL_INFORMATION: Creates a new DialogOfShapeFormat object and calls the showDialog method.
Font attribute
(FONT_FAMILY, FONT_SIZE, FONT_COLOR,
BOLD, ITALIC, UNDERLINE,
SUBSCRIPT/SUPERSCRIPT )
Gets the FontStyle object from the font menu by the getFontStyleFromMenu of the FontStyle method and calls the ExecCommandUtil.setFontStyle methodl.

Text box
(TEXTBOX_LAYOUT, TEXT_ALIGN)
Calls the ExecCommandUtil.setTextBoxLayout method.
Shape attribute
(FILL_COLOR, LINE_COLOR, LINE_WIDTH,
LINE_STROKE, ARROW_STYLE)
Calls the corresponding method such as setFillColor, setLineStroke,..... of the ShapeContainer.

Z-order
(MOVE_TO_FRONT, MOVE_TO_BACK,
MOVE_FORWARD, MOVE_BACKWARD)
Calls the ExecCommandUtil.moveZorder method.
Align
(ALIGN_LEFT, ALIGN_CENTER,
ALIGN_RIGHT, ALIGN_TOP,
ALIGN_MIDDLE, ALIGN_BOTTOM)
Calls the ExecCommandUtil.align method..
Group
(GROUP, UNGROUP)
∙ GROUP: Calls the group method of the ContainerManager.
∙ UNGROUP: Calls the ungroup method of the ContainerManager.
Zoom
(ZOOM, ZOOM_TO)
∙ ZOOM: Creates a new DialogOfZoom object and calls the showDialog method.
∙ ZOOM_TO: Calls the zoom method of the ViewUtil.


Copyright (c) 2009-2013
All other trademarks are property of their respective owners.