Documentation of 'jhplot.gui.GHMargin' Java class.
GHMargin
jhplot.gui

Class GHMargin

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible


    public class GHMargin
    extends javax.swing.JPanel
    Panels with global margin. You can access all margins from GHPanel using panel() method.
    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
      GHMargin(GHPanel w, java.lang.String wname)
      Main class to create global margin
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void disposeMe()
      Dispose this canvas
      java.awt.Color getGBackground()
      Get the color of background
      java.awt.Color getGColor()
      Get the color of this panel
      java.awt.Font getGFont()
      Get the font of the text
      javax.swing.JPanel getJPanel()
      Return JPanel of this margin
      java.awt.Color getMColor()
      Get the text color
      java.awt.Font getMFont()
      Get the font on this panel
      int getRotation()
      Get the rotation angle of the text in degrees.
      int getSizeX()
      Get the size of this margin panel in X
      int getSizeY()
      Get the size of this margin in Y
      java.lang.String getString()
      Get the title of this panel
      double getStringPositionX()
      Get the text position in X relative to widths
      double getStringPositionY()
      Get the text position in Y relative to the frame height.
      boolean isBorder()
      Is boarder shown?
      void setDefault()
      Set the default location
      void setDefault(java.lang.Object com)
      Set the default location
      void setGBackground(java.awt.Color c)
      Set the background of this panel
      void setGColor(java.awt.Color c)
      Set the color on this panel.
      void setGFont(java.awt.Font f)
      Set the font.
      void setGRecBackground(java.awt.Color c)
      Set the background for rectangle with the text
      void setRotation(int rotation)
      Set the rotation angle of the text in degrees.
      void setSizeMargin(int x, int y)
      Set size of this margin panel
      void setString(java.lang.String sname)
      Set the text on this panel
      void setString(java.lang.String sname, java.awt.Font f, java.awt.Color c) 
      void setString(java.lang.String sname, java.awt.Font f, java.awt.Color c, java.awt.Dimension dd)
      Sets the string.
      void setStringPositionX(double x)
      Set the text position in X relative to the frame width
      void setStringPositionY(double y)
      Set the text position in Y relative to the frame height.
      void showBorder(boolean show)
      Show or not the blue borders during editing.
      void showBorderNoUpdate(boolean show)
      Show or not the blue borders during editing.
      • 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, 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
    • Constructor Detail

      • GHMargin

        public GHMargin(GHPanel w,
                        java.lang.String wname)
        Main class to create global margin
        Parameters:
        w - GHpanel
        wname - Name of this margin
    • Method Detail

      • setDefault

        public void setDefault()
        Set the default location
      • setDefault

        public void setDefault(java.lang.Object com)
        Set the default location
      • disposeMe

        public void disposeMe()
        Dispose this canvas
      • setRotation

        public void setRotation(int rotation)
        Set the rotation angle of the text in degrees. Only 0, -90 and 90 are supported
        Parameters:
        rotation - Rotation of the text (0, -90, 90)
      • getRotation

        public int getRotation()
        Get the rotation angle of the text in degrees. Only 0, -90 and 90 are supported.
        Returns:
        Rotation of the text (0, -90, 90)
      • setString

        public void setString(java.lang.String sname,
                              java.awt.Font f,
                              java.awt.Color c,
                              java.awt.Dimension dd)
        Sets the string.
        Parameters:
        sname - Text of the string
        f - Font used
        c - Color used
      • setGFont

        public void setGFont(java.awt.Font f)
        Set the font.
        Parameters:
        f - Font
      • setGColor

        public void setGColor(java.awt.Color c)
        Set the color on this panel.
        Parameters:
        c - Color of the panel
      • getGColor

        public java.awt.Color getGColor()
        Get the color of this panel
        Returns:
        Color
      • getGFont

        public java.awt.Font getGFont()
        Get the font of the text
        Returns:
        Font Font of the text
      • getGBackground

        public java.awt.Color getGBackground()
        Get the color of background
        Returns:
        Color background color
      • getString

        public java.lang.String getString()
        Get the title of this panel
        Returns:
        title of this panel
      • showBorder

        public void showBorder(boolean show)
        Show or not the blue borders during editing.
        Parameters:
        show - true if shown
      • isBorder

        public boolean isBorder()
        Is boarder shown?
        Returns:
        true if shown
      • showBorderNoUpdate

        public void showBorderNoUpdate(boolean show)
        Show or not the blue borders during editing. UI is not updated.
        Parameters:
        show - true if shown
      • setString

        public void setString(java.lang.String sname)
        Set the text on this panel
        Parameters:
        sname - Text
      • setString

        public void setString(java.lang.String sname,
                              java.awt.Font f,
                              java.awt.Color c)
      • getMFont

        public java.awt.Font getMFont()
        Get the font on this panel
        Returns:
        Font
      • getMColor

        public java.awt.Color getMColor()
        Get the text color
        Returns:
        color margin color
      • setGBackground

        public void setGBackground(java.awt.Color c)
        Set the background of this panel
        Parameters:
        c - Color of this panel
      • setGRecBackground

        public void setGRecBackground(java.awt.Color c)
        Set the background for rectangle with the text
        Parameters:
        c - Color of the rectangle
      • getJPanel

        public javax.swing.JPanel getJPanel()
        Return JPanel of this margin
        Returns:
        JPanel this panel
      • setSizeMargin

        public void setSizeMargin(int x,
                                  int y)
        Set size of this margin panel
        Parameters:
        x - size in X
        y - size in Y
      • getSizeX

        public int getSizeX()
        Get the size of this margin panel in X
        Returns:
        Size of the panel in X
      • getSizeY

        public int getSizeY()
        Get the size of this margin in Y
        Returns:
        size in Y
      • getStringPositionX

        public double getStringPositionX()
        Get the text position in X relative to widths
        Returns:
        position of text in X (from 0 to 1)
      • getStringPositionY

        public double getStringPositionY()
        Get the text position in Y relative to the frame height.
        Returns:
        position of text in Y (from 0 to 1)
      • setStringPositionX

        public void setStringPositionX(double x)
        Set the text position in X relative to the frame width
        Parameters:
        x - position of text in X (from 0 to 1)
      • setStringPositionY

        public void setStringPositionY(double y)
        Set the text position in Y relative to the frame height.
        Parameters:
        y - position of text in Y (from 0 to 1)

DMelt 3.0 © DataMelt by jWork.ORG