mima.presentation.gwt.mindmap
Class NodeView

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by mima.presentation.gwt.mindmap.NodeView
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, NodeObserver
Direct Known Subclasses:
CentralNodeView, SubNodeView

abstract class NodeView
extends com.google.gwt.user.client.ui.Composite
implements NodeObserver

Author:
Virginio Carfagno

Nested Class Summary
private static class NodeView.HidePopupMenuCommand
           
 
Field Summary
private static SubNode _cuttedSubNode
           
protected  Node _node
           
private  NodeComponent _nodeComponent
           
protected  com.google.gwt.user.client.ui.VerticalPanel _nodeComponentContainer
           
protected  NodeCore _nodeCore
           
protected  com.google.gwt.user.client.ui.HorizontalPanel _nodeView
           
private static java.lang.String COMMAND_TITLE_CREATE_SUBNODE
           
private static java.lang.String COMMAND_TITLE_CUT_NODE
           
private static java.lang.String COMMAND_TITLE_EDIT_NODE_TITLE
           
private static java.lang.String COMMAND_TITLE_EXPAND_ALL_SUBNODES
           
private static java.lang.String COMMAND_TITLE_PASTE_NODE
           
private static java.lang.String COMMAND_TITLE_REMOVE_LINK
           
private static java.lang.String COMMAND_TITLE_REMOVE_NOTE
           
private static java.lang.String COMMAND_TITLE_SET_CIRCLE_FRAME
           
private static java.lang.String COMMAND_TITLE_SET_LINK
           
private static java.lang.String COMMAND_TITLE_SET_NOTE
           
private static java.lang.String COMMAND_TITLE_SET_RECTANGLE_FRAME
           
protected static int EDGES_WIDTH
           
protected static boolean IsCreateSubNode
           
 
Constructor Summary
protected NodeView(Node node)
           
 
Method Summary
private  com.google.gwt.user.client.Command createCreateSubNodeCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createCutNodeCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
protected  com.google.gwt.user.client.ui.AbsolutePanel createEdgesContainer()
           
private  com.google.gwt.user.client.Command createEditNodeTitleCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createExpandAllSubNodesCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createPasteNodeCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createRemoveLinkCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createRemoveNoteCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createSetCircleFrameCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
private  com.google.gwt.user.client.Command createSetLinkCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu, int x, int y)
           
private  com.google.gwt.user.client.Command createSetNoteCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu, int x, int y)
           
private  com.google.gwt.user.client.Command createSetRectangleFrameCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)
           
protected abstract  void expand(boolean value)
           
protected  int getAbsoluteEdgeConnectionPointY()
           
(package private) abstract  boolean isComposeRight()
           
 void nodeChanged()
           
protected  void onLoad()
          This method is overriden to syhchronize the view with the model when it first appears on the screen.
protected abstract  void redrawAllEdges()
           
(package private)  void showPopupMenu(com.google.gwt.user.client.Event event)
           
protected  void showTitleEditor(boolean isCreateSubNode)
           
private  void updateNodeComponentContainer()
           
private  void updateNodeFrame()
           
protected abstract  void updateTreeStructure()
           
 void updateView()
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getElement, initWidget, onAttach, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_cuttedSubNode

private static SubNode _cuttedSubNode

COMMAND_TITLE_CREATE_SUBNODE

private static final java.lang.String COMMAND_TITLE_CREATE_SUBNODE
See Also:
Constant Field Values

COMMAND_TITLE_CUT_NODE

private static final java.lang.String COMMAND_TITLE_CUT_NODE
See Also:
Constant Field Values

COMMAND_TITLE_EDIT_NODE_TITLE

private static final java.lang.String COMMAND_TITLE_EDIT_NODE_TITLE
See Also:
Constant Field Values

COMMAND_TITLE_EXPAND_ALL_SUBNODES

private static final java.lang.String COMMAND_TITLE_EXPAND_ALL_SUBNODES
See Also:
Constant Field Values

COMMAND_TITLE_PASTE_NODE

private static final java.lang.String COMMAND_TITLE_PASTE_NODE
See Also:
Constant Field Values

COMMAND_TITLE_REMOVE_LINK

private static final java.lang.String COMMAND_TITLE_REMOVE_LINK
See Also:
Constant Field Values

COMMAND_TITLE_REMOVE_NOTE

private static final java.lang.String COMMAND_TITLE_REMOVE_NOTE
See Also:
Constant Field Values

COMMAND_TITLE_SET_CIRCLE_FRAME

private static final java.lang.String COMMAND_TITLE_SET_CIRCLE_FRAME
See Also:
Constant Field Values

COMMAND_TITLE_SET_LINK

private static final java.lang.String COMMAND_TITLE_SET_LINK
See Also:
Constant Field Values

COMMAND_TITLE_SET_NOTE

private static final java.lang.String COMMAND_TITLE_SET_NOTE
See Also:
Constant Field Values

COMMAND_TITLE_SET_RECTANGLE_FRAME

private static final java.lang.String COMMAND_TITLE_SET_RECTANGLE_FRAME
See Also:
Constant Field Values

EDGES_WIDTH

protected static final int EDGES_WIDTH
See Also:
Constant Field Values

IsCreateSubNode

protected static boolean IsCreateSubNode

_node

protected Node _node

_nodeComponent

private NodeComponent _nodeComponent

_nodeComponentContainer

protected com.google.gwt.user.client.ui.VerticalPanel _nodeComponentContainer

_nodeCore

protected NodeCore _nodeCore

_nodeView

protected com.google.gwt.user.client.ui.HorizontalPanel _nodeView
Constructor Detail

NodeView

protected NodeView(Node node)
Method Detail

createCreateSubNodeCommand

private com.google.gwt.user.client.Command createCreateSubNodeCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createCutNodeCommand

private com.google.gwt.user.client.Command createCutNodeCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createEdgesContainer

protected com.google.gwt.user.client.ui.AbsolutePanel createEdgesContainer()

createEditNodeTitleCommand

private com.google.gwt.user.client.Command createEditNodeTitleCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createExpandAllSubNodesCommand

private com.google.gwt.user.client.Command createExpandAllSubNodesCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createPasteNodeCommand

private com.google.gwt.user.client.Command createPasteNodeCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createRemoveLinkCommand

private com.google.gwt.user.client.Command createRemoveLinkCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createRemoveNoteCommand

private com.google.gwt.user.client.Command createRemoveNoteCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createSetCircleFrameCommand

private com.google.gwt.user.client.Command createSetCircleFrameCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

createSetLinkCommand

private com.google.gwt.user.client.Command createSetLinkCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu,
                                                                int x,
                                                                int y)

createSetNoteCommand

private com.google.gwt.user.client.Command createSetNoteCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu,
                                                                int x,
                                                                int y)

createSetRectangleFrameCommand

private com.google.gwt.user.client.Command createSetRectangleFrameCommand(com.google.gwt.user.client.ui.PopupPanel popupMenu)

expand

protected abstract void expand(boolean value)

getAbsoluteEdgeConnectionPointY

protected int getAbsoluteEdgeConnectionPointY()

isComposeRight

abstract boolean isComposeRight()

nodeChanged

public void nodeChanged()
Specified by:
nodeChanged in interface NodeObserver

onLoad

protected void onLoad()
This method is overriden to syhchronize the view with the model when it first appears on the screen.

Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

redrawAllEdges

protected abstract void redrawAllEdges()

showPopupMenu

void showPopupMenu(com.google.gwt.user.client.Event event)

showTitleEditor

protected void showTitleEditor(boolean isCreateSubNode)

updateNodeComponentContainer

private void updateNodeComponentContainer()

updateNodeFrame

private void updateNodeFrame()

updateTreeStructure

protected abstract void updateTreeStructure()

updateView

public void updateView()