Documentation of 'sgtplot.swing.JGraphicLayout' Java class
JGraphicLayout
sgtplot.swing

Class JGraphicLayout

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable, AbstractPane
    Direct Known Subclasses:
    JLineProfileLayout, JPlotLayout


    public abstract class JGraphicLayout
    extends JPane
    JGraphicLayout is a abstract class that provides the basis for pre-defined layouts using the CartesianGraph class. JGraphicLayout extends JPane.
    Since:
    2.0
    See Also:
    CartesianGraph, JPlotLayout, 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
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      javax.swing.JMenuItem m_edit 
      javax.swing.JMenuItem m_reset 
      static int X_AXIS
      Use X array from SGTData.
      static int Y_AXIS
      Use Y array from SGTData.
      static int Z_AXIS
      Use Z array from SGTData.
      • Fields inherited from class javax.swing.JLayeredPane

        DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
      • 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
    • Constructor Summary

      Constructors 
      Constructor and Description
      JGraphicLayout() 
      JGraphicLayout(java.lang.String id, java.awt.Image img)
      JGraphicLayout constructor.
      JGraphicLayout(java.lang.String id, java.awt.Image img, java.awt.Dimension size)
      JGraphicLayout constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void addAttribute(SGTData data, Attribute attr)
      Associate SGTData with an Attribute.
      void addData(SGTData data)
      Add data to the layout.
      abstract void addData(SGTData data, java.lang.String label)
      Add data to the plot
      void addPropertyChangeListener(java.beans.PropertyChangeListener l)
      Add a PropertyChangeListener to the list.
      void addVetoableChangeListener(java.beans.VetoableChangeListener l) 
      Attribute findAttribute(java.lang.String id)
      Find an Attribute given an id.
      Range2D findRange(SGTGrid data, GridAttribute attr, int dir)
      Find the range of the SGTGrid object in the specified direction.
      Range2D findRange(SGTLine data, int dir)
      Find the range of the SGTLine object in the specific direction.
      SoTRange findSoTRange(SGTGrid data, GridAttribute attr, int dir)
      Find the range of the SGTGrid object in the specified direction.
      SoTRange findSoTRange(SGTLine line, int dir)
      Find the range of the SGTLine object in the specific direction.
      SoTRange findSoTRange(SGTVector data, int dir)
      Find the range of the SGTVector object in the specified direction.
      TimeRange findTimeRange(SGTGrid data, GridAttribute attr)
      Find the TimeRange of the SGTGrid object.
      TimeRange findTimeRange(SGTLine data)
      Find the time range of the SGTLine object.
      double fromUserX(double Xpic, Range2D x) 
      double fromUserY(double Ypic, Range2D y) 
      Attribute getAttribute(SGTData data)
      Find an Attribute given a SGTData object.
      int getBaseUnit()
      Get the base units
      Collection getData()
      Return data associated with the plot.
      java.awt.Image getIconImage()
      Get icon image
      java.lang.String getId()
      Get the identifier
      abstract Rectangle2D.Double getKeyBoundsP()
      Get the bounds for the line or color key.
      Dimension2D getKeyLayerSizeP()
      Get the size of the key layer in physical coordinates.
      JPane getKeyPane()
      Get KeyPane object
      abstract java.lang.String getLocationSummary(SGTData grid)
      Construct a string that summarizes the location of the data.
      Domain getRange()
      Get the current Domain
      Domain getZoomBoundsU()
      Get the zoom bounds in user units
      boolean isClipping()
      Returns true if clipping is on.
      boolean isEditClasses()
      Are sgtplot objects editable?
      boolean isKeyPane()
      Is there a key pane?
      boolean isOverlayed()
      Layer overlay flag.
      void removePropertyChangeListener(java.beans.PropertyChangeListener l)
      Remove the PropertyChangeListener from the list.
      void removeVetoableChangeListener(java.beans.VetoableChangeListener l) 
      abstract void resetZoom()
      Set the axes to the range of the SGTData objects.
      void setBaseUnit(int base)
      Set the base units.
      void setClipping(boolean clip)
      Set clipping on or off.
      void setEditClasses(boolean b)
      Enable sgtplot object property editing
      void setId(java.lang.String id)
      Set the identifier
      abstract void setKeyBoundsP(Rectangle2D.Double r)
      Set the bounds for the line or color key.
      void setKeyLayerSizeP(Dimension2D d)
      Set the size of the key layer in physical coordinates.
      void setOverlayed(boolean over)
      Set flag to overlay the layers.
      abstract void setRange(Domain domain)
      Set the axes to to range specified by the Domain object.
      void setTitles(java.lang.String title, java.lang.String title2, java.lang.String title3)
      Set the plot titles.
      void showMenuEdit() 
      double toUserX(double Xpic, Range2D x) 
      double toUserY(double Ypic, Range2D y) 
      • Methods inherited from class javax.swing.JLayeredPane

        getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getPosition, highestLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, remove, removeAll, setLayer, setLayer, setPosition
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, 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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, updateUI
      • Methods inherited from class java.awt.Container

        addContainerListener, 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, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

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

      • m_edit

        public javax.swing.JMenuItem m_edit
      • m_reset

        public javax.swing.JMenuItem m_reset
    • Constructor Detail

      • JGraphicLayout

        public JGraphicLayout()
      • JGraphicLayout

        public JGraphicLayout(java.lang.String id,
                              java.awt.Image img)
        JGraphicLayout constructor.
        Parameters:
        id - identifier
        img - icon image
        See Also:
        JPlotLayout
      • JGraphicLayout

        public JGraphicLayout(java.lang.String id,
                              java.awt.Image img,
                              java.awt.Dimension size)
        JGraphicLayout constructor.
        Parameters:
        id - identifier
        img - icon image
        size - graph size in device units
        See Also:
        JPlotLayout
    • Method Detail

      • setId

        public void setId(java.lang.String id)
        Set the identifier
        Specified by:
        setId in interface AbstractPane
        Overrides:
        setId in class JPane
        Parameters:
        id - layout identifier
      • getId

        public java.lang.String getId()
        Get the identifier
        Specified by:
        getId in interface AbstractPane
        Overrides:
        getId in class JPane
        Returns:
        layout identifier
      • setTitles

        public void setTitles(java.lang.String title,
                              java.lang.String title2,
                              java.lang.String title3)
        Set the plot titles.
        Parameters:
        title - main plot title
        title2 - secondary plot title
        title3 - tertiary plot title
      • setBaseUnit

        public void setBaseUnit(int base)
        Set the base units. The base units are set automatically based on the first SGTData added to the list. Other SGTData objects added thereafter will be converted to the standard display units for each base unit type. (TEMPERATURE, default units are "degC"; VELOCITY, default units are "m/s"; DISTANCE, default unis are "m"). NOTE: Presently the units supported are very limited.
        See Also:
        Units.NONE, Units.TEMPERATURE, Units.VELOCITY, Units.DISTANCE
      • getBaseUnit

        public int getBaseUnit()
        Get the base units
        Returns:
        the current base units for the layout
      • setOverlayed

        public void setOverlayed(boolean over)
        Set flag to overlay the layers.
        Parameters:
        over - if true overlay layers if false stack
      • isOverlayed

        public boolean isOverlayed()
        Layer overlay flag.
        Returns:
        true if layers will be overlayed
      • getIconImage

        public java.awt.Image getIconImage()
        Get icon image
        Returns:
        icon image
      • getKeyPane

        public JPane getKeyPane()
        Get KeyPane object
        Returns:
        pane
      • isKeyPane

        public boolean isKeyPane()
        Is there a key pane?
      • addData

        public void addData(SGTData data)
        Add data to the layout. Where data is added is dependent on the specific layout. Additional layers will be created as required.
        Parameters:
        data - data to be added
      • addAttribute

        public void addAttribute(SGTData data,
                                 Attribute attr)
        Associate SGTData with an Attribute. The associations are managed by a Hashtable object.
      • findAttribute

        public Attribute findAttribute(java.lang.String id)
        Find an Attribute given an id.
        Since:
        3.0
      • addData

        public abstract void addData(SGTData data,
                                     java.lang.String label)
        Add data to the plot
      • getLocationSummary

        public abstract java.lang.String getLocationSummary(SGTData grid)
        Construct a string that summarizes the location of the data.
      • findRange

        public Range2D findRange(SGTLine data,
                                 int dir)
        Find the range of the SGTLine object in the specific direction.
        Parameters:
        data - SGTLine object
        dir - direction
        See Also:
        CartesianGraph
      • findSoTRange

        public SoTRange findSoTRange(SGTLine line,
                                     int dir)
        Find the range of the SGTLine object in the specific direction.
        Parameters:
        data - SGTLine object
        dir - direction
        Returns:
        range as an SoTRange object
        See Also:
        CartesianGraph
      • findSoTRange

        public SoTRange findSoTRange(SGTVector data,
                                     int dir)
        Find the range of the SGTVector object in the specified direction. Uses the U component to find X, Y ranges.
        Parameters:
        data - the data vector
        dir - the direction
        Returns:
        range as an SoTRange object
      • findSoTRange

        public SoTRange findSoTRange(SGTGrid data,
                                     GridAttribute attr,
                                     int dir)
        Find the range of the SGTGrid object in the specified direction.
        Parameters:
        data - the data grid
        attr - the grid attribute
        dir - the direction
        Returns:
        range as an SoTRange object
      • findRange

        public Range2D findRange(SGTGrid data,
                                 GridAttribute attr,
                                 int dir)
        Find the range of the SGTGrid object in the specified direction.
        Parameters:
        data - the data grid
        attr - the grid attribute
        dir - the direction
      • showMenuEdit

        public void showMenuEdit()
      • findTimeRange

        public TimeRange findTimeRange(SGTLine data)
        Find the time range of the SGTLine object.
        Parameters:
        data - SGTLine object
        See Also:
        CartesianGraph
      • findTimeRange

        public TimeRange findTimeRange(SGTGrid data,
                                       GridAttribute attr)
        Find the TimeRange of the SGTGrid object.
        Parameters:
        data - the data grid
        attr - the grid attribute
        dir - the direction
      • setClipping

        public void setClipping(boolean clip)
        Set clipping on or off. If clipping is on, clip to the axes range.
        Parameters:
        clip - true if clipping is on
      • isClipping

        public boolean isClipping()
        Returns true if clipping is on.
        Returns:
        true if clipping is on
      • resetZoom

        public abstract void resetZoom()
        Set the axes to the range of the SGTData objects.
      • setRange

        public abstract void setRange(Domain domain)
                               throws java.beans.PropertyVetoException
        Set the axes to to range specified by the Domain object.
        Throws:
        java.beans.PropertyVetoException
      • getRange

        public Domain getRange()
        Get the current Domain
      • getZoomBoundsU

        public Domain getZoomBoundsU()
        Get the zoom bounds in user units
      • toUserX

        public double toUserX(double Xpic,
                              Range2D x)
      • fromUserX

        public double fromUserX(double Xpic,
                                Range2D x)
      • fromUserY

        public double fromUserY(double Ypic,
                                Range2D y)
      • toUserY

        public double toUserY(double Ypic,
                              Range2D y)
      • getData

        public Collection getData()
        Return data associated with the plot.
        Returns:
        data in a Collection
      • setEditClasses

        public void setEditClasses(boolean b)
        Enable sgtplot object property editing
      • isEditClasses

        public boolean isEditClasses()
        Are sgtplot objects editable?
      • getKeyBoundsP

        public abstract Rectangle2D.Double getKeyBoundsP()
        Get the bounds for the line or color key.
      • setKeyBoundsP

        public abstract void setKeyBoundsP(Rectangle2D.Double r)
        Set the bounds for the line or color key.
      • getKeyLayerSizeP

        public Dimension2D getKeyLayerSizeP()
        Get the size of the key layer in physical coordinates.
      • setKeyLayerSizeP

        public void setKeyLayerSizeP(Dimension2D d)
        Set the size of the key layer in physical coordinates.
      • addVetoableChangeListener

        public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
        Overrides:
        addVetoableChangeListener in class javax.swing.JComponent
      • removeVetoableChangeListener

        public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
        Overrides:
        removeVetoableChangeListener in class javax.swing.JComponent

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.