Jedit 4.1

edu.bsu.cs.gui
Class JeditPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--edu.bsu.cs.gui.JeditPanel
All Implemented Interfaces:
Accessible, ActionListener, AdjustmentListener, EventListener, ImageObserver, MenuContainer, MouseListener, MouseMotionListener, Serializable

public class JeditPanel
extends JPanel
implements MouseListener, MouseMotionListener, AdjustmentListener, ActionListener, Serializable

Renders a JavaGraph and allows the user to manipulate it with mouse events.

Since:
1 Jul 1998
Version:
23 May 2002
Author:
Aaron Nall
, Elizabeth VandenBerg
See Also:
JPanel, MouseListener, MouseMotionListener, AdjustmentListener, ActionListener, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int ADDARC
          A flag used with setMouseAction to indicate that mouse drags add Arcs to the panel's JavaGraph.
static int ADDEDGE
          A flag used with setMouseAction to indicate that mouse drags add Edges to the panel's JavaGraph.
static int ADDVERTEX
          A flag used with setMouseAction to indicate that mouse presses add Vertices to the panel's JavaGraph.
static int AUTOMATICALGORITHM
          A flag used with edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to to indicate that the algorithm determined by getAlgorithm will start automatically.
static int MOVETHINGS
          A flag used with setMouseAction to indicate that mouse drags move Vertices, Edges, and Arcs in the panel's JavaGraph.
static int NOTHING
          A flag used with setMouseAction to indicate that mouse actions are ignored.
static int ONECLICKALGORITHM
          A flag used with setMouseAction and edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to indicate that the next mouse click will launch the algorithm determined by getAlgorithm.
static int TEXTINPUTALGORITHM
          A flag used with edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to to indicate that the algorithm determined by getAlgorithm requires text input.
static int TWOCLICKALGORITHM
          A flag used with setMouseAction and edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to indicate that the next two mouse clicks will launch the algorithm determined by getAlgorithm.
 
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
JeditPanel(JeditFrame f)
          Creates a new JavaGraph for the new JeditPanel.
JeditPanel(JeditFrame f, JeditPanel first)
          This cloning constructor makes the new JeditPanel an exact copy of the JeditPanel first.
 
Method Summary
 void actionPerformed(ActionEvent e)
          This method is used to act on the user's selections in the popup menus.
 void adjustmentValueChanged(AdjustmentEvent e)
          This method is used when Scrollbars are moved.
 void autoLabelAllEdges()
          This method sets the labels of all Edges/Arcs to reflect their endpoint Vertices.
 void backup()
          Store a copy of the current JavaGraph as a backup.
 void doTextualAlgorithm(String inputText)
          This method is used to run an algorithm that requires text input.
 void drawBackgroundGrid(Graphics g, double unitX, double unitY, int maxX, int maxY, Color thecolor)
          Draws the Background grid.
 Algorithm getAlgorithm()
          Gets the Algorithm that will be run on the Panel.
 Color getBackgroundColor()
          Get the Panel's background color.
 boolean getDelay()
          Gets the flag that determines whether or not algorithms should be animated when run on the Panel.
 boolean getEdgeAutoLabel()
          Get the flag that tells whether or not to label new Edges/Arcs with their Endpoint Vertices' labels (starting at zero)
 Color getEdgeColor()
          Get the default Color for new Edges/Arcs
 String getEdgeLabel()
          Get the default label for new Edes/Arcs that are not labeld with their endpoint vertices
 double getEdgeWeight()
          Get the default weight for new Edges/Arcs
 double getEdgeWeight2()
          Get the default second weight for new Edges/Arcs
 boolean getEnable()
          Used to get the panel's state for accepting mouse input (true) or ignoring it (false).
 JeditFrame getFrame()
           
 JavaGraph getGraph()
          Retrieve the JavaGraph for this panel.
 String getInputTextString()
          Gets the String that will appear by default in the window prompting a user for input to start an algorithm that requires text input.
 Color getLabelColor()
          Get the Color of Edge/Arc labels and weights, Vertex weights, and the status string.
 int getMouseAction()
          This method is used to determine the meaning of mouse actions on the canvas.
 Point getOffSet()
          Return the coordinates for the upper left corner of the visible panel.
 boolean getShowEdgeLabel()
          Get the flag determining whether or not to render Edge/Arc labels
 boolean getShowEdgeWeight()
          Get the flag that determines whether or not to show Edge/Arc weights
 boolean getShowVertexLabel()
          Get the flag determining whether or not to render Vertex labels
 boolean getShowVertexWeight()
          Get the flag that determines whether or not to show Vertex weights
 boolean getVertexAutoLabel()
          Get the flag that tells whether or not to label new Vertices with their number in the graph (starting at zero)
 Color getVertexColor()
          Gets the default color for new Vertices
 String getVertexLabel()
          Get the default label for new Vertices that are not automatically labeled with numbers
 int getVertexRadius()
          Get the default radius for all Vertices.
 double getVertexWeight()
          Get the default weight for new Vertices.
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
          This method is used for adding Edges/Arcs and moving objects around the panel.
 void mouseEntered(MouseEvent e)
          Not implemented.
 void mouseExited(MouseEvent e)
          Not implemented.
 void mouseMoved(MouseEvent e)
          Not implemented.
 void mousePressed(MouseEvent e)
          This method is used to add Vertices and start algorithms.
 void mouseReleased(MouseEvent e)
           
 void paint(Graphics g)
          Responsible for all of the JavaGraph rendering.
 void restoreBackup()
          Change the panel's JavaGraph to the backed up version.
 void setAlgorithm(Algorithm newAlgorithm)
          Sets the Algorithm that will be run on the Panel.
 void setBackgroundColor(Color newColor)
          Set the Panel's background color.
 void setDelay(boolean newValue)
          Sets the flag that determines whether or not algorithms should be animated when run on the Panel.
 void setEdgeAutoLabel(boolean toDo)
          Set the flag that tells whether or not to label new Edges/Arcs with their Endpoint Vertices' labels (starting at zero)
 void setEdgeColor(Color newColor)
          Set the default Color for new Edges/Arcs
 void setEdgeLabel(String newLabel)
          Set the default label for new Edes/Arcs that are not labeld with their endpoint vertices
 void setEdgeWeight(double newValue)
          Set the default weight for new Edges/Arcs
 void setEdgeWeight2(double newValue)
          Set the default second weight for new Edges/Arcs
 void setEnable(boolean newvalue)
          Used to set the panel in a state to accept mouse input (true) or ignore it (false).
 void setGraph(JavaGraph newGraph)
          Set the JavaGraph for this panel.
 void setGridColor(Color newColor)
          Sets the gridColor.
 void setGridUnitXY(double ux, double uy)
          Sets the gridUnitX and gridUnitY.
 void setGridX0Y0(int x, int y)
          Sets gridX0 and gridY0.
 void setInputTextString(String input)
          Sets the String that will appear by default in the window prompting a user for input to start an algorithm that requires text input.
 void setLabelColor(Color newColor)
          Set the Color of Edge/Arc labels and weights, Vertex weights, and the status string.
 void setMouseAction(int newAction)
          This method is used to set the meaning of mouse actions on the canvas.
 void setOffSet(Point newPoint)
          Set the coordinates for the upper left corner of the visible panel.
 void setShowEdgeLabel(boolean in)
          Set the flag determining whether or not to render Edge/Arc labels
 void setShowEdgeWeight(boolean in)
          Set the flag that determines whether or not to show Edge/Arc weights
 void setShowVertexLabel(boolean in)
          Set the flag determining whether or not to render Vertex labels
 void setShowVertexWeight(boolean in)
          Set the flag that determines whether or not to show Vertex weights
 void setStatus(String newStatus)
          Set the text for the status written in the lower left corner of the panel.
 void setVertexAutoLabel(boolean toDo)
          Set the flag that tells whether or not to label new Vertices with their number in the graph (starting at zero)
 void setVertexColor(Color newColor)
          Set the default label for new Vertices that are not automatically labeled with numbers
 void setVertexLabel(String newString)
          Sets the default color for new Vertices
 void setVertexRadius(int newRadius)
          Set the default radius for all Vertices
 void setVertexWeight(double newWeight)
          Set the default weight for new Vertices.
 void update(Graphics g)
          Overridden for double-buffering.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, 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
 

Field Detail

ADDVERTEX

public static final int ADDVERTEX
A flag used with setMouseAction to indicate that mouse presses add Vertices to the panel's JavaGraph.

See Also:
Constant Field Values

ADDEDGE

public static final int ADDEDGE
A flag used with setMouseAction to indicate that mouse drags add Edges to the panel's JavaGraph.

See Also:
Constant Field Values

ADDARC

public static final int ADDARC
A flag used with setMouseAction to indicate that mouse drags add Arcs to the panel's JavaGraph.

See Also:
Constant Field Values

MOVETHINGS

public static final int MOVETHINGS
A flag used with setMouseAction to indicate that mouse drags move Vertices, Edges, and Arcs in the panel's JavaGraph.

See Also:
Constant Field Values

NOTHING

public static final int NOTHING
A flag used with setMouseAction to indicate that mouse actions are ignored.

See Also:
Constant Field Values

ONECLICKALGORITHM

public static final int ONECLICKALGORITHM
A flag used with setMouseAction and edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to indicate that the next mouse click will launch the algorithm determined by getAlgorithm.

See Also:
Constant Field Values

TEXTINPUTALGORITHM

public static final int TEXTINPUTALGORITHM
A flag used with edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to to indicate that the algorithm determined by getAlgorithm requires text input.

See Also:
Constant Field Values

TWOCLICKALGORITHM

public static final int TWOCLICKALGORITHM
A flag used with setMouseAction and edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to indicate that the next two mouse clicks will launch the algorithm determined by getAlgorithm.

See Also:
Constant Field Values

AUTOMATICALGORITHM

public static final int AUTOMATICALGORITHM
A flag used with edu.bsu.cs.algorithm.setType and edu.bsu.cs.algorithm.getType to to indicate that the algorithm determined by getAlgorithm will start automatically.

See Also:
Constant Field Values
Constructor Detail

JeditPanel

public JeditPanel(JeditFrame f)
Creates a new JavaGraph for the new JeditPanel.


JeditPanel

public JeditPanel(JeditFrame f,
                  JeditPanel first)
This cloning constructor makes the new JeditPanel an exact copy of the JeditPanel first.

Method Detail

getFrame

public JeditFrame getFrame()

update

public void update(Graphics g)
Overridden for double-buffering.

Overrides:
update in class JComponent
Parameters:
g - The graphics to update.

paint

public void paint(Graphics g)
Responsible for all of the JavaGraph rendering.

Overrides:
paint in class JComponent
Parameters:
g - The graphics to paint.

setGridColor

public void setGridColor(Color newColor)
Sets the gridColor.

Parameters:
newColor - The color to set the grid.

setGridUnitXY

public void setGridUnitXY(double ux,
                          double uy)
Sets the gridUnitX and gridUnitY.

Parameters:
ux - Becomes the value of gridUnitX.
uy - Becomes the value of gridUnitY.

setGridX0Y0

public void setGridX0Y0(int x,
                        int y)
Sets gridX0 and gridY0.

Parameters:
x - Becomes the value of gridX0.
y - Becomes the value of gridY0.

drawBackgroundGrid

public void drawBackgroundGrid(Graphics g,
                               double unitX,
                               double unitY,
                               int maxX,
                               int maxY,
                               Color thecolor)
Draws the Background grid.

Parameters:
g - The graphics.
unitX -
unitY -
maxX -
maxY -
thecolor -

mouseMoved

public void mouseMoved(MouseEvent e)
Not implemented.

Specified by:
mouseMoved in interface MouseMotionListener

mousePressed

public void mousePressed(MouseEvent e)
This method is used to add Vertices and start algorithms.

Specified by:
mousePressed in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
This method is used for adding Edges/Arcs and moving objects around the panel.

Specified by:
mouseDragged in interface MouseMotionListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Not implemented.

Specified by:
mouseExited in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Not implemented.

Specified by:
mouseEntered in interface MouseListener

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

adjustmentValueChanged

public void adjustmentValueChanged(AdjustmentEvent e)
This method is used when Scrollbars are moved.

Specified by:
adjustmentValueChanged in interface AdjustmentListener

setMouseAction

public void setMouseAction(int newAction)
This method is used to set the meaning of mouse actions on the canvas.
See Also:


getMouseAction

public int getMouseAction()
This method is used to determine the meaning of mouse actions on the canvas.
See Also:


actionPerformed

public void actionPerformed(ActionEvent e)
This method is used to act on the user's selections in the popup menus. The three popup menus are for Vertices, Edges, and Arcs.

Specified by:
actionPerformed in interface ActionListener

getGraph

public JavaGraph getGraph()
Retrieve the JavaGraph for this panel.


setGraph

public void setGraph(JavaGraph newGraph)
Set the JavaGraph for this panel.


setStatus

public void setStatus(String newStatus)
Set the text for the status written in the lower left corner of the panel.


getEnable

public boolean getEnable()
Used to get the panel's state for accepting mouse input (true) or ignoring it (false).


setEnable

public void setEnable(boolean newvalue)
Used to set the panel in a state to accept mouse input (true) or ignore it (false).


backup

public void backup()
Store a copy of the current JavaGraph as a backup.
See restoreBackup


restoreBackup

public void restoreBackup()
Change the panel's JavaGraph to the backed up version.
See backup


getVertexWeight

public double getVertexWeight()
Get the default weight for new Vertices.


setVertexWeight

public void setVertexWeight(double newWeight)
Set the default weight for new Vertices.


getVertexRadius

public int getVertexRadius()
Get the default radius for all Vertices.


setVertexRadius

public void setVertexRadius(int newRadius)
Set the default radius for all Vertices


getVertexAutoLabel

public boolean getVertexAutoLabel()
Get the flag that tells whether or not to label new Vertices with their number in the graph (starting at zero)


setVertexAutoLabel

public void setVertexAutoLabel(boolean toDo)
Set the flag that tells whether or not to label new Vertices with their number in the graph (starting at zero)


getEdgeAutoLabel

public boolean getEdgeAutoLabel()
Get the flag that tells whether or not to label new Edges/Arcs with their Endpoint Vertices' labels (starting at zero)


setEdgeAutoLabel

public void setEdgeAutoLabel(boolean toDo)
Set the flag that tells whether or not to label new Edges/Arcs with their Endpoint Vertices' labels (starting at zero)


getVertexColor

public Color getVertexColor()
Gets the default color for new Vertices


setVertexLabel

public void setVertexLabel(String newString)
Sets the default color for new Vertices


getVertexLabel

public String getVertexLabel()
Get the default label for new Vertices that are not automatically labeled with numbers


setVertexColor

public void setVertexColor(Color newColor)
Set the default label for new Vertices that are not automatically labeled with numbers


getEdgeWeight

public double getEdgeWeight()
Get the default weight for new Edges/Arcs


setEdgeWeight

public void setEdgeWeight(double newValue)
Set the default weight for new Edges/Arcs


getEdgeWeight2

public double getEdgeWeight2()
Get the default second weight for new Edges/Arcs


setEdgeWeight2

public void setEdgeWeight2(double newValue)
Set the default second weight for new Edges/Arcs


getEdgeLabel

public String getEdgeLabel()
Get the default label for new Edes/Arcs that are not labeld with their endpoint vertices


setEdgeLabel

public void setEdgeLabel(String newLabel)
Set the default label for new Edes/Arcs that are not labeld with their endpoint vertices


setEdgeColor

public void setEdgeColor(Color newColor)
Set the default Color for new Edges/Arcs


getEdgeColor

public Color getEdgeColor()
Get the default Color for new Edges/Arcs


getBackgroundColor

public Color getBackgroundColor()
Get the Panel's background color.


setBackgroundColor

public void setBackgroundColor(Color newColor)
Set the Panel's background color.


getLabelColor

public Color getLabelColor()
Get the Color of Edge/Arc labels and weights, Vertex weights, and the status string.


setLabelColor

public void setLabelColor(Color newColor)
Set the Color of Edge/Arc labels and weights, Vertex weights, and the status string.


setShowVertexLabel

public void setShowVertexLabel(boolean in)
Set the flag determining whether or not to render Vertex labels


setShowEdgeLabel

public void setShowEdgeLabel(boolean in)
Set the flag determining whether or not to render Edge/Arc labels


getShowVertexLabel

public boolean getShowVertexLabel()
Get the flag determining whether or not to render Vertex labels


getShowEdgeLabel

public boolean getShowEdgeLabel()
Get the flag determining whether or not to render Edge/Arc labels


getShowEdgeWeight

public boolean getShowEdgeWeight()
Get the flag that determines whether or not to show Edge/Arc weights


getShowVertexWeight

public boolean getShowVertexWeight()
Get the flag that determines whether or not to show Vertex weights


setShowEdgeWeight

public void setShowEdgeWeight(boolean in)
Set the flag that determines whether or not to show Edge/Arc weights


setShowVertexWeight

public void setShowVertexWeight(boolean in)
Set the flag that determines whether or not to show Vertex weights


setAlgorithm

public void setAlgorithm(Algorithm newAlgorithm)
Sets the Algorithm that will be run on the Panel.


getAlgorithm

public Algorithm getAlgorithm()
Gets the Algorithm that will be run on the Panel.


getDelay

public boolean getDelay()
Gets the flag that determines whether or not algorithms should be animated when run on the Panel.


setDelay

public void setDelay(boolean newValue)
Sets the flag that determines whether or not algorithms should be animated when run on the Panel.


doTextualAlgorithm

public void doTextualAlgorithm(String inputText)
This method is used to run an algorithm that requires text input.


setInputTextString

public void setInputTextString(String input)
Sets the String that will appear by default in the window prompting a user for input to start an algorithm that requires text input.


getInputTextString

public String getInputTextString()
Gets the String that will appear by default in the window prompting a user for input to start an algorithm that requires text input.


getOffSet

public Point getOffSet()
Return the coordinates for the upper left corner of the visible panel.


setOffSet

public void setOffSet(Point newPoint)
Set the coordinates for the upper left corner of the visible panel.


autoLabelAllEdges

public void autoLabelAllEdges()
This method sets the labels of all Edges/Arcs to reflect their endpoint Vertices.


Jedit 4.1