Class AbstractDotElement
- java.lang.Object
-
- org.processmining.plugins.graphviz.dot.AbstractDotElement
-
- All Implemented Interfaces:
java.awt.event.MouseListener,java.util.EventListener,DotElement
public abstract class AbstractDotElement extends java.lang.Object implements DotElement
-
-
Constructor Summary
Constructors Constructor Description AbstractDotElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMouseListener(java.awt.event.MouseListener l)Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes).voidaddSelectionListener(DotElementSelectionListener listener)Add a selection/deselection listener.protected java.lang.StringescapeString(java.lang.String value)java.lang.StringgetId()java.lang.StringgetLabel()java.lang.StringgetOption(java.lang.String key)java.util.Set<java.lang.String>getOptionKeySet()java.util.List<DotElementSelectionListener>getSelectionListeners()booleanisSelectable()Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes).java.lang.StringlabelToString()voidmouseClicked(java.awt.event.MouseEvent e)voidmouseEntered(java.awt.event.MouseEvent e)voidmouseExited(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)voidmouseReleased(java.awt.event.MouseEvent e)voidsetLabel(java.lang.String label)voidsetOption(java.lang.String key, java.lang.String value)voidsetSelectable(boolean selectable)Sets whether this node can be selected.
-
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfaceDotElement
-
getLabel
public java.lang.String getLabel()
- Specified by:
getLabelin interfaceDotElement
-
setLabel
public void setLabel(java.lang.String label)
- Specified by:
setLabelin interfaceDotElement
-
labelToString
public java.lang.String labelToString()
-
escapeString
protected java.lang.String escapeString(java.lang.String value)
-
setOption
public void setOption(java.lang.String key, java.lang.String value)- Specified by:
setOptionin interfaceDotElement
-
getOption
public java.lang.String getOption(java.lang.String key)
- Specified by:
getOptionin interfaceDotElement- Returns:
- the value of the option if it was set, otherwise null.
-
getOptionKeySet
public java.util.Set<java.lang.String> getOptionKeySet()
- Specified by:
getOptionKeySetin interfaceDotElement- Returns:
- the set of options that is set (keys)
-
addMouseListener
public void addMouseListener(java.awt.event.MouseListener l)
Description copied from interface:DotElementPlease note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. The same holds for mouseEnter and mouseExit events: these are based on drawn pixels. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").- Specified by:
addMouseListenerin interfaceDotElement
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
-
setSelectable
public void setSelectable(boolean selectable)
Description copied from interface:DotElementSets whether this node can be selected. Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").- Specified by:
setSelectablein interfaceDotElement
-
isSelectable
public boolean isSelectable()
Description copied from interface:DotElementPlease note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").- Specified by:
isSelectablein interfaceDotElement- Returns:
- whether the element is selectable.
-
addSelectionListener
public void addSelectionListener(DotElementSelectionListener listener)
Description copied from interface:DotElementAdd a selection/deselection listener. Side-effect: enables selection of the element. Thread-safe. Please note that in the current implementation, only a click on a drawn pixel of an element is registered as a click (due to Bezier curves for edges and irregular shapes for nodes). Thus, only if a user clicks on the border or label of a node, the click is registered. To avoid this problem, give each node a fill using node.setOption("fillcolor", "#FFFFFF") and node.setOption("style", "filled").- Specified by:
addSelectionListenerin interfaceDotElement
-
getSelectionListeners
public java.util.List<DotElementSelectionListener> getSelectionListeners()
- Specified by:
getSelectionListenersin interfaceDotElement
-
-