Documentation of 'medusa.display.EditableGraphPanel' Java class
EditableGraphPanel
medusa.display

Class EditableGraphPanel

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, java.util.EventListener, javax.accessibility.Accessible
    Direct Known Subclasses:
    AnimatedGraphPanel


    public class EditableGraphPanel
    extends BasicGraphPanel
    Describe class EditableGraphPanel here. This class extends BasicGraphPanel and allows mouse interactions, and also data manipulation.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.BaselineResizeBehavior
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addGradientX(int channel) 
      void addGradientY(int channel) 
      void addGraph(Graph g) 
      void alignNodes(int align) 
      void appendGraph(java.lang.String fileName) 
      void clearGraph() 
      void clearImage() 
      void copyGraphSettings(java.lang.String fileName) 
      void copyNodeSettings(Graph g) 
      void crop(double confidence) 
      void drawBackgroundImage(java.awt.Graphics2D g2d) 
      Node getExtremeNode(int extreme, java.util.List<Node> nodes) 
      java.util.ArrayList getFixed() 
      void growSelection() 
      void handleReleaseRightButton(java.awt.event.MouseEvent e) 
      void initShow() 
      void loadGraph(java.lang.String fileName) 
      void manipulateColor(int a, int b, boolean doSwitch) 
      void markNode(java.awt.Graphics2D g2d, Node markedNode) 
      void mouseDragged(java.awt.event.MouseEvent e) 
      void mousePressed(java.awt.event.MouseEvent e) 
      void mouseReleased(java.awt.event.MouseEvent e) 
      void paintComponent(java.awt.Graphics g)
      Paints the component
      void paintEdge(java.awt.Graphics2D g, Edge e) 
      void paintNet(java.awt.Graphics2D g2d)
      Paints nodes and edges
      void paintVisibleNet(java.awt.Graphics2D g2d) 
      void removeEdgeByLabel(java.lang.String label) 
      void removeFixedNodes() 
      void saveGraph(java.lang.String fileName) 
      void saveImage(java.lang.String path, int param)
      Saves graph as an image
      int selectNodeByRegExp(java.lang.String regexp, boolean label) 
      int selectNodeFromFile(java.lang.String fileName)
      Reads a file of node names and selected those nodes in the graph.
      void setHideEdge(int i, boolean b) 
      void setImage()
      Sets the default image
      void setImage(java.awt.image.BufferedImage myImage) 
      void setImage(java.lang.String imageURL)
      Sets the background image
      void setShape(int shape)
      Sets the shape for fixed nodes
      void setShowBorder(boolean show) 
      void setShowEdge(int i, boolean b)
      Shows the interaction type i
      void setShowName(boolean b)
      Switches between showing node name and annotation
      void subtractGraph(java.lang.String fileName) 
      void writeArena3D(java.lang.String fileName) 
      void writeBiolayout(java.lang.String fileName) 
      void writeCytoscape(java.lang.String fileName) 
      void writeEPS(java.lang.String fileName) 
      void writeGraphViz(java.lang.String fileName) 
      void writePajek(java.lang.String fileName) 
      void writePS(java.lang.String fileName) 
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • showBorder

        public boolean showBorder
      • EXTREME_LEFT

        public static int EXTREME_LEFT
      • EXTREME_RIGHT

        public static int EXTREME_RIGHT
      • EXTREME_TOP

        public static int EXTREME_TOP
      • EXTREME_BOTTOM

        public static int EXTREME_BOTTOM
    • Constructor Detail

      • EditableGraphPanel

        public EditableGraphPanel(MedusaSettings stringSettings)
        Constructor with settings
        Parameters:
        stringSettings - settings
      • EditableGraphPanel

        public EditableGraphPanel()
        Constructor with default settings
    • Method Detail

      • setImage

        public void setImage()
                      throws java.io.IOException
        Sets the default image
        Throws:
        java.io.IOException - if default file
      • setImage

        public void setImage(java.lang.String imageURL)
                      throws java.io.IOException
        Sets the background image
        Parameters:
        imageURL - path to image
        Throws:
        java.io.IOException - if image is not found or cannot be read.
      • setImage

        public void setImage(java.awt.image.BufferedImage myImage)
                      throws java.lang.InterruptedException
        Parameters:
        myImage -
        Throws:
        java.lang.InterruptedException
      • clearImage

        public void clearImage()
      • drawBackgroundImage

        public void drawBackgroundImage(java.awt.Graphics2D g2d)
      • setShowBorder

        public void setShowBorder(boolean show)
      • saveImage

        public void saveImage(java.lang.String path,
                              int param)
        Description copied from class: BasicGraphPanel
        Saves graph as an image
        Overrides:
        saveImage in class BasicGraphPanel
        Parameters:
        path - file to save as
        param - type of picture. Currently, 0=jpg 1=png
      • paintComponent

        public void paintComponent(java.awt.Graphics g)
        Paints the component
        Overrides:
        paintComponent in class BasicGraphPanel
        Parameters:
        g - current graphics
      • paintVisibleNet

        public void paintVisibleNet(java.awt.Graphics2D g2d)
      • setShowName

        public void setShowName(boolean b)
        Switches between showing node name and annotation
        Parameters:
        b - true if names are to be shown, false if annotation
      • mouseDragged

        public void mouseDragged(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class BasicGraphPanel
      • handleReleaseRightButton

        public void handleReleaseRightButton(java.awt.event.MouseEvent e)
      • mouseReleased

        public void mouseReleased(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class BasicGraphPanel
      • mousePressed

        public void mousePressed(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class BasicGraphPanel
      • initShow

        public void initShow()
      • setShowEdge

        public void setShowEdge(int i,
                                boolean b)
        Shows the interaction type i
        Parameters:
        i - interaction type to show
        b - true: paint interaction type. false: hide interaction type
      • setHideEdge

        public void setHideEdge(int i,
                                boolean b)
      • setShape

        public void setShape(int shape)
        Sets the shape for fixed nodes
        Parameters:
        shape - 0-3: implemented shapes in PaintTools
      • getFixed

        public java.util.ArrayList getFixed()
      • copyNodeSettings

        public void copyNodeSettings(Graph g)
      • removeEdgeByLabel

        public void removeEdgeByLabel(java.lang.String label)
      • removeFixedNodes

        public void removeFixedNodes()
      • crop

        public void crop(double confidence)
      • markNode

        public void markNode(java.awt.Graphics2D g2d,
                             Node markedNode)
      • selectNodeByRegExp

        public int selectNodeByRegExp(java.lang.String regexp,
                                      boolean label)
      • selectNodeFromFile

        public int selectNodeFromFile(java.lang.String fileName)
                               throws java.io.IOException
        Reads a file of node names and selected those nodes in the graph.
        Parameters:
        fileName -
        Returns:
        Throws:
        java.io.IOException
      • manipulateColor

        public void manipulateColor(int a,
                                    int b,
                                    boolean doSwitch)
      • addGradientX

        public void addGradientX(int channel)
      • addGradientY

        public void addGradientY(int channel)
      • clearGraph

        public void clearGraph()
      • saveGraph

        public void saveGraph(java.lang.String fileName)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • writePajek

        public void writePajek(java.lang.String fileName)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • writeArena3D

        public void writeArena3D(java.lang.String fileName)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeCytoscape

        public void writeCytoscape(java.lang.String fileName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writeGraphViz

        public void writeGraphViz(java.lang.String fileName)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeBiolayout

        public void writeBiolayout(java.lang.String fileName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writePS

        public void writePS(java.lang.String fileName)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • writeEPS

        public void writeEPS(java.lang.String fileName)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • addGraph

        public void addGraph(Graph g)
      • growSelection

        public void growSelection()
      • alignNodes

        public void alignNodes(int align)
      • getExtremeNode

        public Node getExtremeNode(int extreme,
                                   java.util.List<Node> nodes)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.