Documentation of 'sgtplot.beans.Panel' Java class
Panel
sgtplot.beans

Class Panel

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, LayerControl


    public class Panel
    extends javax.swing.JComponent
    implements LayerControl
    A Layer container that provides a StackedLayout of the Layers.
    Since:
    3.0
    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
    • 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.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor and Description
      Panel(PanelHolder ph)
      Panel constructor with PanelHolder argument.
      Panel(java.lang.String name)
      Panel constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addData(SGTData data, Attribute attr, DataGroup dataGroup, Legend legend)
      Add data to this Panel and DataGroup.
      void draw(java.awt.Graphics g) 
      void draw(org.freehep.graphics2d.VectorGraphics g)
      Used internally by sgtplot.
      void drawDraggableItems(org.freehep.graphics2d.VectorGraphics g)
      Used internally by sgtplot.
      DataGroupLayer findDataGroupLayer(java.lang.String id)
      Find DataGroupLayer in Panel.
      java.lang.String getId()
      Get the identifier for the Panel
      Layer getLayer(java.lang.String id)
      Get Layer from this Panel.
      Layer getLayerFromDataId(java.lang.String id)
      Get Layer from this Panel.
      java.lang.Object getObjectAt(int x, int y, boolean check)
      Find object associated with a MOUSE_DOWN event.
      java.lang.Object[] getObjectsAt(int x, int y, boolean check)
      Find objects associated with a MOUSE_DOWN event.
      JPane getPane()
      Get the JPane the Panel is associated with.
      boolean hasLayer(java.lang.String id)
      Does this Panel contain this Layer?
      boolean isDataInPanel(java.lang.String id)
      Checks to see if a data id matches that data attached to the Graph.
      void resetZoom()
      Reset the zoom for all DataGroupLayers in this Panel.
      void setClipping(boolean clip)
      Set clipping for DataGroupLayers in this Panel.
      void setPane(AbstractPane pane)
      Set the Pane the Panel is associated with.
      void setPanelHolder(PanelHolder ph)
      Set PanelHolder.
      java.lang.String toString()
      Get a String representation of the Layer.
      void update()
      Traverses the PanelHolder and adds any new objects and updates exisiting objects.
      • 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, getUIClassID, 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, updateUI
      • 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, getAccessibleContext, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

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

      • Panel

        public Panel(java.lang.String name)
        Panel constructor. PanelHolder will need to be set.
        Parameters:
        name - Panel name
      • Panel

        public Panel(PanelHolder ph)
        Panel constructor with PanelHolder argument. Panel name set from PanelHolder identifier.
        Parameters:
        ph - PanelHolder
    • Method Detail

      • setPanelHolder

        public void setPanelHolder(PanelHolder ph)
        Set PanelHolder. PanelHolder contains the layout information and DataGroups associated with the Panel.
        Parameters:
        ph - PanelHolder
      • update

        public void update()
        Traverses the PanelHolder and adds any new objects and updates exisiting objects.
      • getObjectAt

        public java.lang.Object getObjectAt(int x,
                                            int y,
                                            boolean check)
        Find object associated with a MOUSE_DOWN event. The getObjectAt method scans through all the objects associated with the Panel to find one whose bounding box contains the mouse location. This method should not be called by a user.
        Parameters:
        x - mouse coordinate
        y - mouse coordinate
        check - if true requires that object isSelectable
        Returns:
        object at location
      • resetZoom

        public void resetZoom()
        Reset the zoom for all DataGroupLayers in this Panel.
      • setClipping

        public void setClipping(boolean clip)
        Set clipping for DataGroupLayers in this Panel.
        Parameters:
        clip - if true clip data to bounds.
      • hasLayer

        public boolean hasLayer(java.lang.String id)
        Does this Panel contain this Layer?
        Parameters:
        id - layer identification
        Returns:
        true, if Layer is in Panel
      • getLayer

        public Layer getLayer(java.lang.String id)
        Get Layer from this Panel. Returns null if Layer is not found.
        Parameters:
        id - Layer identifier
        Returns:
        Layer
      • isDataInPanel

        public boolean isDataInPanel(java.lang.String id)
        Checks to see if a data id matches that data attached to the Graph.
        Parameters:
        id - data identifier
        Returns:
        true if data is in Panel
      • getLayerFromDataId

        public Layer getLayerFromDataId(java.lang.String id)
        Get Layer from this Panel. Returns null if Layer is not found.
        Parameters:
        id - SGTData identifier
        Returns:
        Layer
      • getObjectsAt

        public java.lang.Object[] getObjectsAt(int x,
                                               int y,
                                               boolean check)
        Find objects associated with a MOUSE_DOWN event. The getObjecstAt method scans through all the objects associated with the Panel to find those whose bounding box contains the mouse location. This method should not be called by a user.
        Parameters:
        x - mouse coordinate
        y - mouse coordinate
        check - if selectable
        Returns:
        object array
      • findDataGroupLayer

        public DataGroupLayer findDataGroupLayer(java.lang.String id)
        Find DataGroupLayer in Panel.
        Parameters:
        id - DataGroupLayer identifier
        Returns:
        DataGroupLayer
      • getPane

        public JPane getPane()
        Get the JPane the Panel is associated with.
        Returns:
        Refence to the Pane
      • setPane

        public void setPane(AbstractPane pane)
        Set the Pane the Panel is associated with. This method is called by Pane when the Pane.add method is exectued.
        Specified by:
        setPane in interface LayerControl
        Parameters:
        pane - The Pane
      • getId

        public java.lang.String getId()
        Get the identifier for the Panel
        Specified by:
        getId in interface LayerControl
        Returns:
        identifier/name
      • toString

        public java.lang.String toString()
        Get a String representation of the Layer.
        Overrides:
        toString in class java.awt.Component
        Returns:
        String representation

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.