|
JGraph X 0.15.0.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.mxgraph.swing.util.mxMouseControl
com.mxgraph.swing.handler.mxGraphHandler
public class mxGraphHandler
Nested Class Summary | |
---|---|
class |
mxGraphHandler.MouseRedirector
|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected mxRectangle |
bbox
Scaled, translated bounding box of the selection cells. |
protected boolean |
canImport
|
protected Object |
cell
|
protected mxRectangle |
cellBounds
Scaled, translated bounds of the selection cells. |
protected Object[] |
cells
|
protected boolean |
centerPreview
Specifies if preview should be centered around the mouse cursor if there was no mouse click to define the offset within the shape (eg. |
protected boolean |
cloneEnabled
|
protected boolean |
constrainedEvent
Workaround for shift-key-state not correct in mouseReleased. |
static Cursor |
DEFAULT_CURSOR
|
static int |
DEFAULT_MAX_HANDLES
|
protected Object[] |
dragCells
|
protected ImageIcon |
dragImage
|
protected mxGraphComponent |
graphComponent
|
protected Map |
handlers
Maps from cells to handlers in the order of the selection cells. |
protected boolean |
imagePreview
|
protected Object |
initialCell
|
protected boolean |
keepOnTop
|
protected mxCellMarker |
marker
|
protected int |
maxHandles
Defines the maximum number of handles to paint individually. |
protected JComponent |
preview
|
protected mxRectangle |
previewBbox
|
protected mxRectangle |
previewBounds
|
protected mxEventSource.mxEventListener |
refreshHandler
|
protected Point |
start
|
protected mxRectangle |
transferBounds
Unscaled, untranslated bounding box of the selection cells. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
mxGraphHandler(mxGraphComponent graphComponent)
|
Method Summary | |
---|---|
Point |
convertPoint(Point pt)
|
protected MouseEvent |
createEvent(DropTargetEvent e)
|
protected void |
createPreview()
|
protected void |
destroyPreview()
|
void |
dispatchMousePressed(MouseEvent e)
Dispatches the mousepressed event to the subhandles. |
void |
dragEnter(DropTargetDragEvent e)
|
void |
dragExit(DropTargetEvent e)
|
void |
dragOver(DropTargetDragEvent e)
|
void |
drop(DropTargetDropEvent e)
|
void |
dropActionChanged(DropTargetDragEvent e)
|
protected void |
fold(Object cell)
|
protected Cursor |
getCursor(MouseEvent e)
|
protected static JComponent |
getDropTarget(DropTargetEvent e)
Helper method to return the component for a drop target event. |
protected static mxGraphTransferHandler |
getGraphTransferHandler(DropTargetEvent e)
Helper method to return the component for a drop target event. |
mxCellHandler |
getHandler(Object cell)
|
String |
getHandleToolTipText(MouseEvent e)
Redirects a tooltip request from the graph component to the handles. |
int |
getMaxHandles()
|
protected Collection |
getMovableCells(Collection cells)
|
JComponent |
getPreview()
Returns the component that is used for drawing the preview. |
protected Point |
getPreviewLocation(MouseEvent e,
boolean gridEnabled)
|
String |
getToolTipText(MouseEvent e)
Redirects the tooltip handling of the JComponent to the graph component, which in turn may use getHandleToolTipText in this class to find a tooltip associated with a handle. |
boolean |
isCenterPreview()
|
boolean |
isCloneEnabled()
|
boolean |
isImagePreview()
|
boolean |
isKeepOnTop()
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
protected void |
move(Object[] cells,
double dx,
double dy,
MouseEvent e)
|
void |
paintComponent(Graphics g)
|
void |
refresh()
|
void |
reset()
|
void |
setCenterPreview(boolean centerPreview)
|
void |
setCloneEnabled(boolean cloneEnabled)
|
void |
setImagePreview(boolean imagePreview)
|
void |
setKeepOnTop(boolean keepOnTop)
|
void |
setMaxHandles(int maxHandles)
|
void |
start(MouseEvent e)
|
void |
updateDragImage(Object[] cells)
|
Methods inherited from class com.mxgraph.swing.util.mxMouseControl |
---|
mouseClicked, mouseEntered, mouseExited |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static Cursor DEFAULT_CURSOR
public static int DEFAULT_MAX_HANDLES
protected mxGraphComponent graphComponent
protected boolean cloneEnabled
protected boolean imagePreview
protected int maxHandles
protected boolean centerPreview
protected boolean keepOnTop
protected transient Map handlers
protected transient Object[] cells
protected transient JComponent preview
protected transient ImageIcon dragImage
protected transient Point start
protected transient Object cell
protected transient Object initialCell
protected transient Object[] dragCells
protected transient mxCellMarker marker
protected transient boolean canImport
protected transient mxRectangle cellBounds
protected transient mxRectangle bbox
protected transient mxRectangle previewBounds
protected transient mxRectangle previewBbox
protected transient mxRectangle transferBounds
protected transient boolean constrainedEvent
protected transient mxEventSource.mxEventListener refreshHandler
Constructor Detail |
---|
public mxGraphHandler(mxGraphComponent graphComponent)
graphComponent
- Method Detail |
---|
public JComponent getPreview()
public void setKeepOnTop(boolean keepOnTop)
public boolean isKeepOnTop()
public void setCloneEnabled(boolean cloneEnabled)
public boolean isCloneEnabled()
public void setImagePreview(boolean imagePreview)
public boolean isImagePreview()
public void setCenterPreview(boolean centerPreview)
public boolean isCenterPreview()
public int getMaxHandles()
public void setMaxHandles(int maxHandles)
protected void createPreview()
public void updateDragImage(Object[] cells)
protected void destroyPreview()
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
mouseMoved
in class mxMouseControl
protected Cursor getCursor(MouseEvent e)
public void dragEnter(DropTargetDragEvent e)
dragEnter
in interface DropTargetListener
public String getToolTipText(MouseEvent e)
getToolTipText
in class JComponent
public String getHandleToolTipText(MouseEvent e)
public void dispatchMousePressed(MouseEvent e)
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class mxMouseControl
public void start(MouseEvent e)
public void dropActionChanged(DropTargetDragEvent e)
dropActionChanged
in interface DropTargetListener
public void dragOver(DropTargetDragEvent e)
dragOver
in interface DropTargetListener
e
- public Point convertPoint(Point pt)
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
mouseDragged
in class mxMouseControl
protected Point getPreviewLocation(MouseEvent e, boolean gridEnabled)
public void dragExit(DropTargetEvent e)
dragExit
in interface DropTargetListener
e
- public void drop(DropTargetDropEvent e)
drop
in interface DropTargetListener
e
- public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class mxMouseControl
protected void fold(Object cell)
public void reset()
protected void move(Object[] cells, double dx, double dy, MouseEvent e)
dx
- dy
- e
- public mxCellHandler getHandler(Object cell)
public void refresh()
protected final Collection getMovableCells(Collection cells)
public void paintComponent(Graphics g)
paintComponent
in class JComponent
protected MouseEvent createEvent(DropTargetEvent e)
protected static final mxGraphTransferHandler getGraphTransferHandler(DropTargetEvent e)
protected static final JComponent getDropTarget(DropTargetEvent e)
|
JGraph X 0.15.0.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |