Documentation of 'sgtplot.PointCollectionKey' Java class
PointCollectionKey
sgtplot

Class PointCollectionKey

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener, DataKey, LayerChild, Moveable, Selectable


    public class PointCollectionKey
    extends java.lang.Object
    implements java.lang.Cloneable, DataKey, Moveable, java.beans.PropertyChangeListener
    PointCollectionKey is used to create a key for the PointCartesianRenderer. Multiple lines can be included in the key.
    Since:
    2.0
    • Constructor Detail

      • PointCollectionKey

        public PointCollectionKey()
        Default constructor.
      • PointCollectionKey

        public PointCollectionKey(Point2D.Double loc,
                                  int valign,
                                  int halign)
        Create PointCollectionKey.
    • Method Detail

      • copy

        public LayerChild copy()
        Create of copy of PointCollectionKey.
        Specified by:
        copy in interface LayerChild
        Returns:
        A copy of the LayerChild.
      • setSelected

        public void setSelected(boolean sel)
        Description copied from interface: Selectable
        Sets the selected property.
        Specified by:
        setSelected in interface Selectable
        Parameters:
        sel - true if selected, false if not.
      • isSelected

        public boolean isSelected()
        Description copied from interface: Selectable
        Returns true if the object's selected property is set.
        Specified by:
        isSelected in interface Selectable
        Returns:
        true if selected, false if not.
      • setSelectable

        public void setSelectable(boolean select)
        Description copied from interface: Selectable
        Set the Selectable property.
        Specified by:
        setSelectable in interface Selectable
        Parameters:
        select - if true object is selectable
      • isSelectable

        public boolean isSelectable()
        Description copied from interface: Selectable
        Returns true if the current state is selectable.
        Specified by:
        isSelectable in interface Selectable
        Returns:
        true if selectable
      • isMoveable

        public boolean isMoveable()
        Description copied from interface: Moveable
        Returns true if the current state is moveable
        Specified by:
        isMoveable in interface Moveable
        Returns:
        true if moveable
      • setMoveable

        public void setMoveable(boolean moveable)
        Description copied from interface: Moveable
        Set the moveable property.
        Specified by:
        setMoveable in interface Moveable
      • setLayer

        public void setLayer(Layer l)
        Set parent layer.
        Specified by:
        setLayer in interface LayerChild
        Parameters:
        l - parent layer
      • modified

        public void modified(java.lang.String mess)
        Description copied from interface: LayerChild
        Used by sgtplot internally.
        Specified by:
        modified in interface LayerChild
      • setId

        public void setId(java.lang.String id)
        Set PointCollectionKey identifier.
        Specified by:
        setId in interface LayerChild
        Parameters:
        id - key identifier
      • getId

        public java.lang.String getId()
        Get PointCollectionKey identifier
        Specified by:
        getId in interface LayerChild
        Returns:
        identifier
      • setLineLengthP

        public void setLineLengthP(double len)
        Set line length.
        Specified by:
        setLineLengthP in interface DataKey
        Parameters:
        len - line length
      • getLineLengthP

        public double getLineLengthP()
        Get line length
        Returns:
        line length
      • setColumns

        public void setColumns(int col)
        Set the number of columns.
        Specified by:
        setColumns in interface DataKey
        Parameters:
        col - number of columns
      • getColumns

        public int getColumns()
        Get the number of columns.
        Returns:
        number of columns
      • getBorderStyle

        public int getBorderStyle()
        Get border style.
        Returns:
        border style
      • setAlign

        public void setAlign(int vert,
                             int horz)
        Set alignment.
        Specified by:
        setAlign in interface DataKey
        Parameters:
        vert - vertical alignment
        horz - horizontal alignment
      • setVAlign

        public void setVAlign(int vert)
        Set vertical alignment
        Specified by:
        setVAlign in interface DataKey
        Parameters:
        vert - vertical alignment
      • setHAlign

        public void setHAlign(int horz)
        Set horizontal alignment
        Specified by:
        setHAlign in interface DataKey
        Parameters:
        horz - horizontal alignment
      • getVAlign

        public int getVAlign()
        Get vertical alignment
        Returns:
        vertical alignment
      • getHAlign

        public int getHAlign()
        Get horizontal alignment
        Returns:
        horizontal alignment
      • setLocationP

        public void setLocationP(Point2D.Double loc)
        Set location of key
        Property Change: location.
        Specified by:
        setLocationP in interface DataKey
        Parameters:
        loc - key location
      • getLocationP

        public Point2D.Double getLocationP()
        Get location of key.
        Returns:
        Key location
      • addPointGraph

        public void addPointGraph(PointCartesianRenderer points,
                                  SGLabel label)
        Add a PointCartesianRenderer and label to the PointCollectionKey.
        Parameters:
        line - PointCartesianRenderer object
        label - descriptive label
      • addGraph

        public void addGraph(CartesianRenderer rend,
                             SGLabel label)
                      throws java.lang.IllegalArgumentException
        Add a PointCartesianRenderer and label to the PointCollectionKey.
        Specified by:
        addGraph in interface DataKey
        Parameters:
        rend - CartesianRenderer object
        label - descriptive label
        Throws:
        java.lang.IllegalArgumentException
        Since:
        3.0
      • removePointGraph

        public void removePointGraph(SGLabel label)
        Remove a line from the PointCollectionKey.
      • removePointRenderer

        public void removePointRenderer(PointCartesianRenderer line)
        Remove a line from the PointCollectionKey.
      • removePointGraph

        public void removePointGraph(java.lang.String ident)
        Remove a line from the PointCollectionKey.
      • clearAll

        public void clearAll()
        Remove all lines from the PointCollectionKey.
      • clear

        public void clear(java.lang.String data_id)
        Remove data from key by id.
      • getRowHeight

        public int getRowHeight()
        Return height of key row in pixels.
      • draw

        public void draw(org.freehep.graphics2d.VectorGraphics g)
        Draw the Key.
        Specified by:
        draw in interface LayerChild
        Parameters:
        g - Graphics context
      • getBounds

        public java.awt.Rectangle getBounds()
        Get the bounding rectangle.
        Specified by:
        getBounds in interface Moveable
        Specified by:
        getBounds in interface Selectable
        Returns:
        bounding rectangle
      • getLocation

        public java.awt.Point getLocation()
        Description copied from interface: Moveable
        Gets the location in device coordinates.
        Specified by:
        getLocation in interface Moveable
        Returns:
        location
      • setLocation

        public void setLocation(java.awt.Point loc)
        Description copied from interface: Moveable
        Sets the location in device coordinates.
        Specified by:
        setLocation in interface Moveable
      • setBounds

        public void setBounds(java.awt.Rectangle r)
        Set the bounds, in pixels, of the PointCollectionKey
      • setBounds

        public void setBounds(int x,
                              int y,
                              int width,
                              int height)
        Set the bounds, in pixels, of the PointCollectionKey
        Property Change: location.
      • toString

        public java.lang.String toString()
        Description copied from interface: LayerChild
        Return a string that represents the LayerChild.
        Specified by:
        toString in interface LayerChild
        Overrides:
        toString in class java.lang.Object
        Returns:
        Stringified LayerChild representation.
      • isVisible

        public boolean isVisible()
        Description copied from interface: LayerChild
        Check if LayerChild is visible.
        Specified by:
        isVisible in interface LayerChild
        Returns:
        true if visible
      • setVisible

        public void setVisible(boolean visible)
        Description copied from interface: LayerChild
        Set visibility for a LayerChild.
        Specified by:
        setVisible in interface LayerChild
        Parameters:
        visible - visible if true
      • propertyChange

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

        public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
        Description copied from interface: Moveable
        Add a new PropertyChangeListener. Properties will include "moved". Implementation of the following two methods will normally be via the PropertyChangeSupport class.
        Specified by:
        addPropertyChangeListener in interface Moveable
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
        Description copied from interface: Moveable
        Remove a listener.
        Specified by:
        removePropertyChangeListener in interface Moveable

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.