|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.mindfusion.diagramming.DiagramView
public class DiagramView
DiagramView is a Swing component that displays the content of a Diagram
object.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
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.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DiagramView()
Initializes a new instance of the DiagramView class. |
|
DiagramView(Diagram diagram)
Initializes a new instance of the DiagramView class. |
Method Summary | |
---|---|
void |
ancestorAdded(javax.swing.event.AncestorEvent event)
Implements AncestorListener. |
void |
ancestorMoved(javax.swing.event.AncestorEvent event)
Implements AncestorListener. |
void |
ancestorRemoved(javax.swing.event.AncestorEvent event)
Implements AncestorListener. |
void |
beginEdit(InplaceEditable item)
Enters inplace-edit mode, letting the user edit the text of the specified item. |
void |
beginEdit(InplaceEditable item,
java.awt.geom.Point2D mousePosition)
Enters inplace-edit mode, letting the user edit the text of the specified item. |
void |
bringIntoView(DiagramItem item)
Scrolls the viewport so that the specified item will be visible. |
void |
cancelDrag()
|
boolean |
copyToClipboard()
Copies the current selection of items to the system clipboard. |
boolean |
copyToClipboard(boolean groups)
Copies the current selection of items to the system clipboard. |
boolean |
cutToClipboard()
Cuts the currently selected items to the system clipboard. |
boolean |
cutToClipboard(boolean groups)
Cuts the currently selected items to the system clipboard. |
java.awt.geom.Point2D.Float |
deviceToDoc(int x,
int y)
Transforms points from the client coordinate space to the document coordinate space. |
java.awt.geom.Point2D.Float |
deviceToDoc(java.awt.Point devPoint)
Transforms points from the client coordinate space to the document coordinate space. |
java.awt.geom.Rectangle2D.Float |
deviceToDoc(java.awt.Rectangle devRect)
Transforms points from the client coordinate space to the document coordinate space. |
java.awt.Point |
docToDevice(java.awt.geom.Point2D docPoint)
Transforms points from the document coordinate space to the device coordinate space. |
java.awt.Rectangle |
docToDevice(java.awt.geom.Rectangle2D docRect)
Transforms points from the document coordinate space to the device coordinate space. |
void |
endEdit(boolean accept)
Exits inplace-edit mode and either accepts or rejects the changes made to the item's text. |
boolean |
getAllowInplaceEdit()
Gets a value indicating whether users are allowed to edit the text of diagram items. |
java.awt.Cursor |
getAllowLinkCursor()
Gets the cursor shown when the currently drawn arrow can be attached to the item at the current mouse pointer location. |
SmoothingMode |
getAntiAlias()
Gets the current anti-aliasing mode for non text objects. |
boolean |
getAutoScroll()
Gets a value indicating whether the diagram will scroll automatically when the mouse is dragged towards the edge of the view. |
int |
getBehavior()
Gets a value indicating how the control responds to users actions. |
java.awt.Cursor |
getCounterDiagonalResizeCursor()
Gets the cursor shown when dragging from the current mouse pointer location would start resizing an item along its secondary diagonal. |
BehaviorBase |
getCustomBehavior()
Gets custom behavior object specifying how the control responds to mouse input. |
java.lang.Class |
getCustomLinkType()
Gets a custom type of DiagramLink-derived objects that will be created when the users starts drawing with the mouse. |
java.lang.Class |
getCustomNodeType()
Gets the type of a DiagramNode-derived class whose instance should be created when a user starts drawing. |
int |
getDelKeyAction()
Gets a value that specifies what action should be carried out when the user hits the Del key. |
java.awt.Cursor |
getDiagonalResizeCursor()
Gets the cursor shown when dragging from the current mouse pointer location would start resizing an item along its main diagonal. |
Diagram |
getDiagram()
Gets the diagram displayed by this view. |
java.awt.Cursor |
getDisallowCursor()
Gets the cursor shown when an item cannot be created at the current mouse pointer location. |
java.awt.Cursor |
getDisallowLinkCursor()
Gets the cursor shown when the currently created arrow cannot be attached to the item at the current mouse pointer location. |
int |
getDragThreshold()
Gets the minimum distance the mouse should be dragged, measured in pixels, that would cause a drag event instead of click. |
java.awt.Cursor |
getDrawLinkCursor()
Gets the cursor shown when an arrow can be drawn from the current mouse pointer location. |
java.awt.Font |
getFont()
|
java.awt.Cursor |
getHorizontalResizeCursor()
Gets the cursor shown when dragging from the current mouse pointer location would start resizing an item horizontally. |
boolean |
getInplaceEditAcceptOnEnter()
Gets a value indicating whether pressing the ENTER key ends inplace editing and accepts changes. |
boolean |
getInplaceEditCancelOnEsc()
Gets a value indicating whether pressing the ESC key ends inplace editing and cancels changes. |
java.awt.Font |
getInplaceEditFont()
Gets the font used to display text in the inplace- edit text control. |
int |
getModificationStart()
Gets a value indicating how users can start modifying items in the diagram. |
java.awt.Cursor |
getMoveCursor()
Gets the cursor shown when the item under the mouse pointer can be modified. |
java.awt.Cursor |
getPanCursor()
Gets the cursor shown when panning the diagram view. |
java.awt.Cursor |
getPointerCursor()
Gets the mouse cursor shown when no modification is performed. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
Provides support for scrolling when the diagram in placed inside a scroll pane. |
java.awt.Dimension |
getPreferredSize()
Returns the size of the diagram in pixels, based on the currently set document size and zoom level. |
PrintOptions |
getPrintOptions()
Returns a PrintOptions instance that allows customizing
various aspects of printing and print-preview. |
java.awt.Cursor |
getRotateCursor()
Gets the cursor shown when dragging from the current mouse pointer location would start rotating a box. |
int |
getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
Provides support for scrolling when the diagram in placed inside a scroll pane. |
boolean |
getScrollableTracksViewportHeight()
Provides support for scrolling when the diagram in placed inside a scroll pane. |
boolean |
getScrollableTracksViewportWidth()
Provides support for scrolling when the diagram in placed inside a scroll pane. |
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
Provides support for scrolling when the diagram in placed inside a scroll pane. |
float |
getScrollX()
Gets the horizontal scroll position. |
float |
getScrollY()
Gets the vertical scroll position. |
SmoothingMode |
getTextAntiAlias()
Gets the current anti-aliasing mode for text. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event)
Returns the string to be used as the tooltip for event . |
boolean |
getTrackPointedItem()
Gets a value indicating whether the control will raise the mouseEnterItem and
mouseLeaveItem events. |
java.awt.Cursor |
getVerticalResizeCursor()
Gets the cursor shown when dragging from the current mouse pointer location would start resizing an item vertically. |
float |
getZoomFactor()
Gets the current zoom level. |
void |
loadFrom(java.io.InputStream in)
Loads the diagram contents from a stream. |
void |
loadFrom(java.lang.String fileName)
Loads the diagram contents from a file. |
void |
loadFromString(java.lang.String chartData)
Loads the diagram contents from a string. |
void |
loadFromXml(org.w3c.dom.Document document,
boolean freeProcessedXml)
Loads the contents of the XML diagram document. |
void |
loadFromXml(org.xml.sax.InputSource source)
Loads the contents of the XML diagram document. |
void |
loadFromXml(java.io.InputStream stream)
Loads the contents of the XML diagram document. |
void |
loadFromXml(java.lang.String fileName)
Loads the contents of the XML diagram document. |
void |
lostOwnership(java.awt.datatransfer.Clipboard arg0,
java.awt.datatransfer.Transferable arg1)
|
protected void |
paintComponent(java.awt.Graphics g)
|
boolean |
pasteFromClipboard(float dx,
float dy)
Pastes diagram items from the system clipboard. |
boolean |
pasteFromClipboard(float dx,
float dy,
boolean unconnectedLinks)
Pastes diagram items from the system clipboard. |
void |
print()
Prints the current diagram using the default page format. |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Implements the Printable interface. |
void |
print(java.awt.print.PageFormat pageFormat,
java.lang.String printer)
Prints the current diagram using the specified page format. |
void |
print(java.lang.String printer)
Prints the current diagram using the default page format. |
void |
printPreview()
Displays a print preview window, that shows how the diagram would look when printed on paper. |
protected void |
processKeyEvent(java.awt.event.KeyEvent e)
|
void |
recreateCacheImage()
Recreates the off-screen cache bitmap used for fast drawing while modifying items. |
void |
repaint()
Repaints the whole diagram. |
void |
repaint(java.awt.geom.Rectangle2D docRect)
Repaints the specified region of the diagram. |
void |
resumeRepaint()
Resumes repainting the control after a suspendRepaint() call. |
void |
saveTo(java.io.OutputStream out)
Saves the diagram contents into a stream. |
void |
saveTo(java.lang.String fileName)
Saves the diagram contents into a file. |
java.lang.String |
saveToString()
Saves the diagram contents into a string. |
java.lang.String |
saveToString(int format,
boolean includeUnalteredProperties)
Saves the diagram contents into a string. |
void |
saveToXml(org.w3c.dom.Document document)
Saves the diagram to the specified XML document. |
void |
saveToXml(org.w3c.dom.Document document,
boolean includeUnalteredProperties)
Saves the diagram to the specified XML document. |
void |
saveToXml(java.io.OutputStream stream,
boolean includeUnalteredProperties)
Saves the diagram to the specified XML document. |
void |
saveToXml(java.lang.String fileName)
Saves the diagram to the specified XML document. |
void |
scrollTo(float x,
float y)
Scrolls the diagram to the specified position. |
void |
setAllowInplaceEdit(boolean value)
Sets a value indicating whether users are allowed to edit the text of diagram items. |
void |
setAllowLinkCursor(java.awt.Cursor value)
Sets the cursor shown when the currently drawn arrow can be attached to the item at the current mouse pointer location. |
void |
setAntiAlias(SmoothingMode antiAlias)
Sets the current anti-aliasing mode for non text objects. |
void |
setAutoScroll(boolean value)
Sets a value indicating whether the diagram should scroll automatically when the mouse is dragged towards the edge of the view. |
void |
setBehavior(int value)
Sets a value indicating how the control should respond to users actions. |
void |
setCounterDiagonalResizeCursor(java.awt.Cursor value)
Sets the cursor shown when dragging from the current mouse pointer location would start resizing an item along its secondary diagonal. |
void |
setCustomBehavior(BehaviorBase value)
Sets a custom behavior object specifying how the control responds to mouse input. |
void |
setCustomLinkType(java.lang.Class value)
Sets a custom type of DiagramLink-derived objects that will be created when the users starts drawing with the mouse. |
void |
setCustomNodeType(java.lang.Class value)
Sets the type of a DiagramNode-derived class whose instance should be created when a user starts drawing. |
void |
setDelKeyAction(int delKeyAction)
Sets a value that specifies what action should be carried out when the user hits the Del key. |
void |
setDiagonalResizeCursor(java.awt.Cursor value)
Sets the cursor shown when dragging from the current mouse pointer location would start resizing an item along its main diagonal. |
void |
setDiagram(Diagram value)
Sets the diagram displayed by this view. |
void |
setDisallowCursor(java.awt.Cursor value)
Sets the cursor shown when an item cannot be created at the current mouse pointer location. |
void |
setDisallowLinkCursor(java.awt.Cursor value)
Sets the cursor shown when the currently created arrow can be attached to the item at the current mouse pointer location. |
void |
setDragThreshold(int dragThreshold)
Sets the minimum distance the mouse should be dragged, measured in pixels, that would cause a drag event instead of click. |
void |
setDrawLinkCursor(java.awt.Cursor value)
Sets the cursor shown when an arrow can be drawn from the current mouse pointer location. |
void |
setHorizontalResizeCursor(java.awt.Cursor value)
Sets the cursor shown when dragging from the current mouse pointer location would start resizing an item horizontally. |
void |
setInplaceEditAcceptOnEnter(boolean inplaceEditAcceptOnEnter)
Sets a value indicating whether pressing the ENTER key ends inplace editing and accepts changes. |
void |
setInplaceEditCancelOnEsc(boolean inplaceEditCancelOnEsc)
Sets a value indicating whether pressing the ESC key ends inplace editing and cancels changes. |
void |
setInplaceEditFont(java.awt.Font value)
Sets the font used to display text in the inplace- edit text control. |
void |
setModificationStart(int value)
Sets a value indicating how users can start modifying items in the diagram. |
void |
setMoveCursor(java.awt.Cursor value)
Sets the cursor shown when the item under the mouse pointer can be modified. |
void |
setPanCursor(java.awt.Cursor panCursor)
Sets the cursor shown when panning the diagram view |
void |
setPointerCursor(java.awt.Cursor value)
Sets the mouse cursor that should be shown when no modification is performed. |
void |
setRotateCursor(java.awt.Cursor value)
Sets the cursor shown when dragging from the current mouse pointer location would start rotating a box. |
void |
setScrollX(float value)
Sets the horizontal scroll position. |
void |
setScrollY(float value)
Sets the vertical scroll position. |
void |
setTextAntiAlias(SmoothingMode antiAlias)
Sets the current anti-aliasing mode for text. |
void |
setTrackPointedItem(boolean value)
Sets a value indicating whether the control should raise the mouseEnterItem and
mouseLeaveItem events. |
void |
setVerticalResizeCursor(java.awt.Cursor value)
Sets the cursor shown when dragging from the current mouse pointer location would start resizing an item vertically. |
void |
setZoomFactor(float value)
Sets the zoom level. |
void |
suspendRepaint()
Stops repainting the control. |
void |
zoomToFit()
Zooms the diagram so that all its contents becomes visible. |
void |
zoomToFit(java.awt.geom.Rectangle2D rect)
Zooms and scrolls the diagram so that the specified rectangular area becomes visible. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DiagramView()
public DiagramView(Diagram diagram)
Method Detail |
---|
public boolean getTrackPointedItem()
mouseEnterItem
and
mouseLeaveItem
events.
true
if mouseEnterItem
and
mouseLeaveItem
events are raised when the mouse
pointer enters or leaves the bounds of an item, otherwise false.public void setTrackPointedItem(boolean value)
mouseEnterItem
and
mouseLeaveItem
events.
value
- true
if mouseEnterItem
and
mouseLeaveItem
events should be raised when the mouse pointer
enters or leaves the bounds of an item, otherwise false
.public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
Dimension
object representing the preferred size.public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface javax.swing.Scrollable
Dimension
object representing the preferred size.public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in interface javax.swing.Scrollable
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in interface javax.swing.Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface javax.swing.Scrollable
false
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface javax.swing.Scrollable
false
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
event
.
getToolTipText
in class javax.swing.JComponent
public void saveTo(java.io.OutputStream out) throws java.io.IOException
out
- An OutputStream
where
the diagram contents should be saved.
java.io.IOException
public java.lang.String saveToString()
String
containing the base64 encoded diagram contents.public java.lang.String saveToString(int format, boolean includeUnalteredProperties)
format
- A SaveToStringFormat
contstant that indicates
the desired serialized string format.includeUnalteredProperties
- true to serialize all properties;
false to serialize only properties different from their default value.
public void loadFrom(java.io.InputStream in) throws java.io.IOException
in
- An InputStream
from which to load the diagram contents.
java.io.IOException
public void loadFromString(java.lang.String chartData)
chartData
- A String
from which to load the diagram contents.public void saveTo(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException
fileName
- The name of the file into which the diagram
contents should be saved.
java.io.FileNotFoundException
java.io.IOException
public void loadFrom(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException
fileName
- The name of the file from which the diagram
contents should be loaded.
java.io.FileNotFoundException
java.io.IOException
public void saveToXml(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException, XmlException
fileName
- The full path and name of the disk file where the diagram should be saved.
java.io.FileNotFoundException
java.io.IOException
XmlException
public void saveToXml(java.io.OutputStream stream, boolean includeUnalteredProperties) throws XmlException, java.io.IOException
stream
- An OutputStream
where the XML markup should be serialized.
XmlException
java.io.IOException
public void saveToXml(org.w3c.dom.Document document)
document
- A DOM Document object where the diagram should be saved.public void saveToXml(org.w3c.dom.Document document, boolean includeUnalteredProperties)
document
- A DOM Document object where the diagram should be saved.public void loadFromXml(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException, XmlException
fileName
- The name of the XML file the data should be read from.
java.io.FileNotFoundException
java.io.IOException
XmlException
public void loadFromXml(java.io.InputStream stream) throws XmlException
stream
- An InputStream
where the XML markup should be read from.
XmlException
public void loadFromXml(org.xml.sax.InputSource source) throws XmlException
source
- An InputSource
where the XML markup should be read from.
XmlException
public void loadFromXml(org.w3c.dom.Document document, boolean freeProcessedXml) throws XmlException
document
- A DOM Document object from which to load the diagram data.
XmlException
protected void processKeyEvent(java.awt.event.KeyEvent e)
processKeyEvent
in class javax.swing.JComponent
public void suspendRepaint()
public void resumeRepaint()
suspendRepaint()
call.
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void recreateCacheImage()
public java.awt.Rectangle docToDevice(java.awt.geom.Rectangle2D docRect)
docRect
- A Rectangle2D
object, whose
coordinates should be transformed and returned.
Rectangle
instance, which represents the device
coordinates of docRect.public java.awt.geom.Rectangle2D.Float deviceToDoc(java.awt.Rectangle devRect)
devRect
- An instance of the Rectangle
object, whose
coordinates should be transformed and returned.
Rectangle2D.Float
object, which represents the
document coordinates of devRectpublic java.awt.Point docToDevice(java.awt.geom.Point2D docPoint)
docPoint
- A Point2D
object, whose
coordinates should be transformed and returned.
Point
instance, which represents the device
coordinates of docPoint.public java.awt.geom.Point2D.Float deviceToDoc(java.awt.Point devPoint)
devPoint
- An instance of the Point
object, whose
coordinates should be transformed and returned.
Point2D.Float
object, which represents the
document coordinates of devPointpublic java.awt.geom.Point2D.Float deviceToDoc(int x, int y)
x
- y
-
Point2D.Float
object, which represents the
document coordinates of device point (x, y)public PrintOptions getPrintOptions()
PrintOptions
instance that allows customizing
various aspects of printing and print-preview.
PrintOptions
object.public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex)
print
in interface java.awt.print.Printable
public void print()
public void print(java.lang.String printer)
printer
- Specifies the destination printerpublic void print(java.awt.print.PageFormat pageFormat, java.lang.String printer)
pageFormat
- The size and orientation of each page to be printed.printer
- Specifies the destination printerpublic void printPreview()
getPrintOptions()
. That
ensures uniform output of the printed document both on paper and in the
preview window. Print job settings include document title and several flags
that control whether images, shadows, headers, etc. are printed.
public boolean copyToClipboard() throws java.io.IOException
java.io.IOException
public boolean copyToClipboard(boolean groups) throws java.io.IOException
groups
- true to copy item groups; otherwise, false.
java.io.IOException
public boolean cutToClipboard() throws java.io.IOException
java.io.IOException
public boolean cutToClipboard(boolean groups) throws java.io.IOException
groups
- true to cut item groups; otherwise, false.
java.io.IOException
public boolean pasteFromClipboard(float dx, float dy) throws java.io.IOException
dx
- Horizontal offset of pasted items from their original positions.dy
- Vertical offset of pasted items from their original positions.
java.io.IOException
public boolean pasteFromClipboard(float dx, float dy, boolean unconnectedLinks) throws java.io.IOException
dx
- Horizontal offset of pasted items from their original positions.dy
- Vertical offset of pasted items from their original positions.unconnectedLinks
- true to allow pasting arrows whose origin or destination node
has not been copied; otherwise, false. Default is false.
java.io.IOException
public void lostOwnership(java.awt.datatransfer.Clipboard arg0, java.awt.datatransfer.Transferable arg1)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
getFont
in class java.awt.Component
public java.awt.Font getInplaceEditFont()
java.awt.Font
object representing
the font of the inplace edit control.public void setInplaceEditFont(java.awt.Font value)
value
- A java.awt.Font
object representing
the font of the inplace edit control.public int getBehavior()
Behavior
constants.public void setBehavior(int value)
value
- One of the Behavior
constants.public BehaviorBase getCustomBehavior()
public void setCustomBehavior(BehaviorBase value)
public void cancelDrag()
public float getScrollX()
public void setScrollX(float value)
value
- A float value specifying the horizontal scroll position.public float getScrollY()
public void setScrollY(float value)
value
- A float value specifying the vertical scroll position.public void scrollTo(float x, float y)
x
- A float value specifying the horizontal scroll position.y
- A float value specifying the vertical scroll position.public float getZoomFactor()
public void setZoomFactor(float value)
value
- A float value specifying the zoom factor
as percents of the original view size.public void zoomToFit()
public void zoomToFit(java.awt.geom.Rectangle2D rect)
rect
- A Rectangle2D
object representing the
region to which the view should be fitted.public java.awt.Cursor getPointerCursor()
java.awt.Cursor
object.public void setPointerCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getDisallowCursor()
java.awt.Cursor
object.public void setDisallowCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getMoveCursor()
java.awt.Cursor
object.public void setMoveCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getDrawLinkCursor()
java.awt.Cursor
object.public void setDrawLinkCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getAllowLinkCursor()
java.awt.Cursor
object.public void setAllowLinkCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getDisallowLinkCursor()
java.awt.Cursor
object.public void setDisallowLinkCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getHorizontalResizeCursor()
java.awt.Cursor
object.public void setHorizontalResizeCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getRotateCursor()
java.awt.Cursor
object.public void setRotateCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getPanCursor()
java.awt.Cursor
object.public void setPanCursor(java.awt.Cursor panCursor)
value
- A java.awt.Cursor
object.public java.awt.Cursor getVerticalResizeCursor()
java.awt.Cursor
object.public void setVerticalResizeCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getDiagonalResizeCursor()
java.awt.Cursor
object.public void setDiagonalResizeCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public java.awt.Cursor getCounterDiagonalResizeCursor()
java.awt.Cursor
object.public void setCounterDiagonalResizeCursor(java.awt.Cursor value)
value
- A java.awt.Cursor
object.public int getDragThreshold()
public java.lang.Class getCustomNodeType()
public void setCustomNodeType(java.lang.Class value)
value
- public java.lang.Class getCustomLinkType()
public void setCustomLinkType(java.lang.Class value)
public void setDragThreshold(int dragThreshold)
dragThreshold
- The minimal distance to move the mouse before starting a drag operation.public boolean getAutoScroll()
true
if the diagram will scroll automatically,
otherwise false
.public void setAutoScroll(boolean value)
value
- true
if the diagram should scroll
automatically, otherwise false
.public int getModificationStart()
ModificationStart
constants.public void setModificationStart(int value)
value
- One of the ModificationStart
constants.public void bringIntoView(DiagramItem item)
item
- The DiagramItem
to bring into view.public void repaint(java.awt.geom.Rectangle2D docRect)
docRect
- A Rectangle2D
object representing the
region of the diagram that should be repainted.public void repaint()
repaint
in class java.awt.Component
public boolean getAllowInplaceEdit()
true
if users are allowed to edit the text
of diagram items, otherwise false
.public void setAllowInplaceEdit(boolean value)
value
- true
if users are allowed to edit the text
of diagram items, otherwise false
.public boolean getInplaceEditAcceptOnEnter()
true
if ENTER ends inplace editing, otherwise false
public void setInplaceEditAcceptOnEnter(boolean inplaceEditAcceptOnEnter)
inplaceEditAcceptOnEnter
- true
if ENTER should end
inplace editing, otherwise false
public boolean getInplaceEditCancelOnEsc()
true
if ESC should end inplace editing, otherwise false
public void setInplaceEditCancelOnEsc(boolean inplaceEditCancelOnEsc)
inplaceEditCancelOnEsc
- true
if ESC should end inplace editing, otherwise false
public void beginEdit(InplaceEditable item)
item
- The diagram item or table's cell whose text should be edited.public void beginEdit(InplaceEditable item, java.awt.geom.Point2D mousePosition)
item
- The diagram item or table's cell whose text should be edited.public void endEdit(boolean accept)
accept
- true to accept changes made to text; false to reject them.public SmoothingMode getAntiAlias()
SmoothingMode
enumeration.public void setAntiAlias(SmoothingMode antiAlias)
antiAlias
- A member of the SmoothingMode
enumerationsetTextAntiAlias(com.mindfusion.diagramming.SmoothingMode)
public SmoothingMode getTextAntiAlias()
SmoothingMode
enumeration.public void setTextAntiAlias(SmoothingMode antiAlias)
antiAlias
- A member of the SmoothingMode
enumerationsetAntiAlias(com.mindfusion.diagramming.SmoothingMode)
public int getDelKeyAction()
DelKeyAction
enumeration.public void setDelKeyAction(int delKeyAction)
A
- member of the DelKeyAction
enumeration.public void ancestorAdded(javax.swing.event.AncestorEvent event)
ancestorAdded
in interface javax.swing.event.AncestorListener
public void ancestorRemoved(javax.swing.event.AncestorEvent event)
ancestorRemoved
in interface javax.swing.event.AncestorListener
public void ancestorMoved(javax.swing.event.AncestorEvent event)
ancestorMoved
in interface javax.swing.event.AncestorListener
public Diagram getDiagram()
public void setDiagram(Diagram value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |