Documentation of 'kcl.waterloo.graphics.GJAbstractGraphContainer' Java class
GJAbstractGraphContainer
kcl.waterloo.graphics

Class GJAbstractGraphContainer

    • 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
    • Field Summary

      • Fields inherited from class javax.swing.JComponent

        TOOL_TIP_TEXT_KEY, 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.awt.Component add(java.awt.Component c) 
      java.awt.Component add(java.awt.Component c, double x, double y)
      Adds a component to the layout of the container centered at the coordinates specified in x and y.
      java.awt.Component add(java.awt.Component c, double x, double y, int alignX, int alignY)
      Adds a component to the layout of the container at the coordinates specified by x and y.
      void add(GJAnnotationInterface<java.awt.geom.Path2D,GJGraphInterface,java.awt.Stroke,java.awt.Paint,java.awt.Font> a)
      Adds an annotation to the set.
      void addLink(java.lang.Object o)
      Adds an Object to the Links map
      GCFrame createFrame()
      Creates and returns a GCFrame containing this graph container.
      void firePropertyChange(java.beans.PropertyChangeEvent pce) 
      GJAddedComponentMouseHandler getAddedComponentMouseHandler() 
      java.util.ArrayList<GJAnnotationInterface<java.awt.geom.Path2D,GJGraphInterface,java.awt.Stroke,java.awt.Paint,java.awt.Font>> getAnnotations()
      Returns an ArrayList of annotations
      double getAspectRatio() 
      boolean getAxisBox() 
      GJContainerMouseHandler getContainerMouseHandler() 
      org.jdesktop.swingx.painter.effects.AreaEffect getEffect() 
      javax.swing.JComponent getFeaturePane() 
      java.util.ArrayList<java.lang.Object> getLinks()
      Returns the list of linked Objects
      double getRotation() 
      javax.swing.JFormattedTextField getSubTitle() 
      java.lang.String getSubTitleText() 
      javax.swing.JFormattedTextField getTitle() 
      java.lang.String getTitleText() 
      java.awt.geom.AffineTransform getTransform() 
      java.awt.geom.AffineTransform getTransform(double translateX, double translateY) 
      GJGraphInterface getView()
      Returns the view containing the graph in the container
      double getZoom() 
      boolean hasListeners(java.lang.String propertyName)
      Returns true if this instance has installed listeners.
      boolean hasSelfListener()
      Returns true if the implementing instance is a listener.
      java.awt.geom.Point2D inverseTransform(java.awt.Component c, int x, int y)
      Convenience caller to inverseTransform(Component, Point)
      java.awt.geom.Point2D inverseTransform(java.awt.Component c, java.awt.geom.Point2D p)
      Transfrom a point according to latest rotate and zoom settings
      java.awt.geom.Point2D inverseTransform(int x, int y)
      Convenience caller to inverseTransform(Point)
      java.awt.geom.Path2D inverseTransform(java.awt.geom.Path2D p) 
      java.awt.geom.Point2D inverseTransform(java.awt.geom.Point2D p)
      Inverse transform a point according to latest rotate and zoom settings
      java.awt.Shape inverseTransform(java.awt.Shape s) 
      boolean isTranslatable() 
      void paint(java.awt.Graphics g)
      Overridden paint method to take into account the alpha setting.
      void paintComponent(java.awt.Graphics g)
      Overridden to provide Painter support.
      void propertyChange(java.beans.PropertyChangeEvent evt) 
      void remove(java.awt.Component c) 
      void removeLink(java.lang.Object o)
      Removes an Object from the Links map
      void revalidate() 
      void setAnnotations(java.util.ArrayList<GJAnnotationInterface<java.awt.geom.Path2D,GJGraphInterface,java.awt.Stroke,java.awt.Paint,java.awt.Font>> a)
      Replaces the ArrayList of annotations with the supplied instance.
      void setAspectRatio(double aspectRatio) 
      void setAxisBox(boolean flag) 
      void setBackgroundPainted(boolean flag)
      Enables or disables the painting of background depending on the value of the parameter.
      void setCursor(java.awt.Cursor cursor) 
      void setEffect(org.jdesktop.swingx.painter.effects.AreaEffect effect) 
      javax.swing.JComponent setFeaturePane(javax.swing.JComponent comp) 
      void setFont(java.awt.Font f) 
      void setFont(java.awt.Font f, boolean flag) 
      void setForeground(java.awt.Color color) 
      void setForeground(java.awt.Color color, boolean flag) 
      void setKeyAntialiasing(java.lang.Object o) 
      void setLinks(java.util.ArrayList<java.lang.Object> links)
      Sets the list of linked objects
      void setRotation(double theta) 
      void setSubTitle(javax.swing.JFormattedTextField title) 
      void setSubTitleText(java.lang.String newString)
      Thread-safe method for setting the sub-title
      void setTextAntialiasing(java.lang.Object o) 
      void setTitle(javax.swing.JFormattedTextField title) 
      void setTitleText(java.lang.String newString) 
      void setTranslatable(boolean flag) 
      void setView(GJGraphInterface graph)
      Place the view in the container.
      void setZoom(double zoom) 
      java.awt.geom.Point2D transform(double x, double y) 
      java.awt.geom.Point2D transform(int x, int y) 
      java.awt.geom.Path2D transform(java.awt.geom.Path2D s) 
      java.awt.geom.Point2D transform(java.awt.geom.Point2D p) 
      java.awt.Shape transform(java.awt.Shape s) 
      boolean transformContains(int x, int y) 
      boolean transformContains(java.awt.Point p) 
      • 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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        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, 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, 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
    • Method Detail

      • add

        public final java.awt.Component add(java.awt.Component c)
        Overrides:
        add in class java.awt.Container
        Parameters:
        c -
        Returns:
        the added component

      • add

        public java.awt.Component add(java.awt.Component c,
                                      double x,
                                      double y)
        Adds a component to the layout of the container centered at the coordinates specified in x and y. The coordinates are relative to the axes of the graph contained in the component (but added components may extend beyond the clip limits of the graph). The added component is promoted to zero Z-order, so components that are added successively appear above one another (and above the graph). The pixel-based constraints of the added component will be updated internally as necessary.
        Parameters:
        c - the component to add
        x - the x coordinate in GJAbstractGraph space
        y - the y coordinate in GJAbstractGraph space
        Returns:
        the added component

      • add

        public java.awt.Component add(java.awt.Component c,
                                      double x,
                                      double y,
                                      int alignX,
                                      int alignY)

        Adds a component to the layout of the container at the coordinates specified by x and y. Horizontal and vertical alignnment. are specified using an appropriate value from SwingConstants: TOP, BOTTOM, LEFT, RIGHT or CENTERED. The coordinates are relative to the axes of the graph contained in the component (but added components may extend beyond the clip limits of the graph.). The added component is promoted to zero Z-order, so components that are added successively appear above one another (and above the graph).. The pixel-based constraints of the added component will be updated internally as necessary. Alternatively, use the

        Parameters:
        c - the component to add
        x - the x-axis coordinate
        y - the y-axis coordinate
        alignX - Horizontal alignment specified using a SwingConstant value
        alignY - Vertical alignment specified using a SwingConstant value
        Returns:
        the added Component
      • setFeaturePane

        public javax.swing.JComponent setFeaturePane(javax.swing.JComponent comp)
      • getFeaturePane

        public javax.swing.JComponent getFeaturePane()
      • transformContains

        public boolean transformContains(int x,
                                         int y)
      • transformContains

        public boolean transformContains(java.awt.Point p)
      • setFont

        public final void setFont(java.awt.Font f)
        Overrides:
        setFont in class javax.swing.JComponent
      • setFont

        public final void setFont(java.awt.Font f,
                                  boolean flag)
      • setForeground

        public final void setForeground(java.awt.Color color)
        Overrides:
        setForeground in class javax.swing.JComponent
      • setForeground

        public final void setForeground(java.awt.Color color,
                                        boolean flag)
      • setTranslatable

        public void setTranslatable(boolean flag)
      • isTranslatable

        public boolean isTranslatable()
      • getView

        public GJGraphInterface getView()
        Returns the view containing the graph in the container
        Returns:
        the embedded view
      • setRotation

        public void setRotation(double theta)
      • getRotation

        public double getRotation()
      • setZoom

        public void setZoom(double zoom)
      • getZoom

        public double getZoom()
      • getAxisBox

        public boolean getAxisBox()
      • setAxisBox

        public void setAxisBox(boolean flag)
      • setView

        public void setView(GJGraphInterface graph)
        Place the view in the container.
        Parameters:
        graph - - a GJGraphInterface instance
      • remove

        public void remove(java.awt.Component c)
        Overrides:
        remove in class java.awt.Container
      • setKeyAntialiasing

        public void setKeyAntialiasing(java.lang.Object o)
      • setTextAntialiasing

        public void setTextAntialiasing(java.lang.Object o)
      • setBackgroundPainted

        public void setBackgroundPainted(boolean flag)
        Description copied from class: GJBasicPanel

        Enables or disables the painting of background depending on the value of the parameter. Background painting is enabled by default.

        Overrides:
        setBackgroundPainted in class GJBasicPanel
        Parameters:
        flag - if true, axis labels are painted
        See Also:
        GJBasicPanel.isBackgroundPainted(), JComponent.setBackground(Color)
      • revalidate

        public void revalidate()
        Overrides:
        revalidate in class javax.swing.JComponent
      • paint

        public void paint(java.awt.Graphics g)
        Description copied from class: JXPanel
        Overridden paint method to take into account the alpha setting.
        Overrides:
        paint in class JXPanel
        Parameters:
        g - the Graphics context in which to paint
      • paintComponent

        public void paintComponent(java.awt.Graphics g)
        Description copied from class: JXPanel
        Overridden to provide Painter support. It will call backgroundPainter.paint() if it is not null, else it will call super.paintComponent().
        Overrides:
        paintComponent in class GJBasicPanel
        Parameters:
        g - the Graphics context in which to paint
      • getTitle

        public javax.swing.JFormattedTextField getTitle()
      • setTitle

        public void setTitle(javax.swing.JFormattedTextField title)
      • setTitleText

        public void setTitleText(java.lang.String newString)
        Parameters:
        newString - String for the title
      • setCursor

        public void setCursor(java.awt.Cursor cursor)
        Overrides:
        setCursor in class java.awt.Component
      • getTitleText

        public java.lang.String getTitleText()
      • setSubTitleText

        public void setSubTitleText(java.lang.String newString)
        Thread-safe method for setting the sub-title
        Parameters:
        newString - String for the sub-title
      • getSubTitle

        public javax.swing.JFormattedTextField getSubTitle()
      • setSubTitle

        public void setSubTitle(javax.swing.JFormattedTextField title)
      • getSubTitleText

        public java.lang.String getSubTitleText()
      • getTransform

        public java.awt.geom.AffineTransform getTransform()
      • getTransform

        public java.awt.geom.AffineTransform getTransform(double translateX,
                                                          double translateY)
      • transform

        public java.awt.geom.Point2D transform(int x,
                                               int y)
      • transform

        public java.awt.geom.Point2D transform(double x,
                                               double y)
      • transform

        public java.awt.geom.Point2D transform(java.awt.geom.Point2D p)
      • transform

        public java.awt.Shape transform(java.awt.Shape s)
      • transform

        public java.awt.geom.Path2D transform(java.awt.geom.Path2D s)
        Parameters:
        s -
        Returns:
        a Path2D
      • inverseTransform

        public java.awt.geom.Point2D inverseTransform(int x,
                                                      int y)
        Convenience caller to inverseTransform(Point)
        Parameters:
        x - Position in the container
        y - Position in the container
        Returns:
        Point rotated,scaled and translated according to the container's rotation and zoom settings.
      • inverseTransform

        public java.awt.geom.Point2D inverseTransform(java.awt.Component c,
                                                      int x,
                                                      int y)
        Convenience caller to inverseTransform(Component, Point)
        Parameters:
        c - the reference component
        x - Position in the c
        y - Position in the c
        Returns:
        Point rotated,scaled and translated according to the container's rotation and zoom settings bu referenced to Component c .
      • inverseTransform

        public java.awt.geom.Point2D inverseTransform(java.awt.geom.Point2D p)
        Inverse transform a point according to latest rotate and zoom settings
        Parameters:
        p - Point in container
        Returns:
        Point2D. inverseTransform should be used before xPixelToPosition and yPixelToPosition.
      • inverseTransform

        public java.awt.geom.Point2D inverseTransform(java.awt.Component c,
                                                      java.awt.geom.Point2D p)
        Transfrom a point according to latest rotate and zoom settings
        Parameters:
        c -
        p - Point in graph
        Returns:
        Point2D. If there is no AffineTransForm, returns the input inverseTransform should be used before xPixelToPosition and yPixelToPosition.
      • inverseTransform

        public java.awt.Shape inverseTransform(java.awt.Shape s)
      • inverseTransform

        public java.awt.geom.Path2D inverseTransform(java.awt.geom.Path2D p)
      • addLink

        public void addLink(java.lang.Object o)
        Adds an Object to the Links map
        Specified by:
        addLink in interface GJLinkableInterface
      • setLinks

        public final void setLinks(java.util.ArrayList<java.lang.Object> links)
        Description copied from interface: GJLinkableInterface
        Sets the list of linked objects
        Specified by:
        setLinks in interface GJLinkableInterface
        Parameters:
        links - ArrayList
        • removeLink

          public void removeLink(java.lang.Object o)
          Removes an Object from the Links map
          Specified by:
          removeLink in interface GJLinkableInterface
        • getLinks

          public java.util.ArrayList<java.lang.Object> getLinks()
          Returns the list of linked Objects
          Specified by:
          getLinks in interface GJLinkableInterface
          Returns:
          the ArrayList of linked Objects
        • createFrame

          public GCFrame createFrame()
          Creates and returns a GCFrame containing this graph container.
          Returns:
          a GCFrame
        • propertyChange

          public void propertyChange(java.beans.PropertyChangeEvent evt)
          Specified by:
          propertyChange in interface java.beans.PropertyChangeListener
        • getAspectRatio

          public double getAspectRatio()
          Returns:
          the aspectRatio
        • setAspectRatio

          public void setAspectRatio(double aspectRatio)
          Parameters:
          aspectRatio - the aspectRatio to set
        • setEffect

          public void setEffect(org.jdesktop.swingx.painter.effects.AreaEffect effect)
          Specified by:
          setEffect in interface GJEffectorInterface

        DMelt 3.0 © DataMelt by jWork.ORG

        You see the box below because you did not login.