Package jflex.gui

Class GridPanel

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

    public class GridPanel
    extends java.awt.Panel
    Grid layout manager like GridLayout but with predefinable grid size.
    Version:
    JFlex 1.9.1
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Panel

        java.awt.Panel.AccessibleAWTPanel
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int cols  
      private java.util.List<GridPanelConstraint> constraints  
      private int hgap  
      private java.awt.Insets insets  
      private int rows  
      private static long serialVersionUID  
      private int vgap  
      • Fields inherited from class java.awt.Component

        accessibleContext, 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 Description
      GridPanel​(int cols, int rows)
      Construct a new GridPanel with 0 hgap/vgap.
      GridPanel​(int cols, int rows, int hgap, int vgap)
      Constructor for Grid Panel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int x, int y, int dx, int dy, int handle, java.awt.Component c)
      Add a component to this panel.
      void add​(int x, int y, int dx, int dy, java.awt.Component c)
      Add a component to this panel with Handles.FILL.
      void add​(int x, int y, int handle, java.awt.Component c)
      Add a component to this panel with dx=dy=1
      void add​(int x, int y, java.awt.Component c)
      Add a component to this panl with Handles.FILL and dx=dy=1
      void doLayout()
      Lays out the views.
      java.awt.Dimension getPreferredSize()
      getPreferredSize.
      void setInsets​(java.awt.Insets insets)
      Sets the insets.
      • Methods inherited from class java.awt.Panel

        addNotify, getAccessibleContext
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

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

      • cols

        private final int cols
      • rows

        private final int rows
      • hgap

        private final int hgap
      • vgap

        private final int vgap
      • insets

        private java.awt.Insets insets
    • Constructor Detail

      • GridPanel

        public GridPanel​(int cols,
                         int rows)
        Construct a new GridPanel with 0 hgap/vgap.
      • GridPanel

        public GridPanel​(int cols,
                         int rows,
                         int hgap,
                         int vgap)
        Constructor for Grid Panel.
        Parameters:
        cols - number of columns.
        rows - number of rwos.
        hgap - a int.
        vgap - a int.
    • Method Detail

      • doLayout

        public void doLayout()
        Lays out the views.
        Overrides:
        doLayout in class java.awt.Container
      • getPreferredSize

        public java.awt.Dimension getPreferredSize()
        getPreferredSize.
        Overrides:
        getPreferredSize in class java.awt.Container
        Returns:
        a Dimension object.
      • setInsets

        public void setInsets​(java.awt.Insets insets)
        Sets the insets.
        Parameters:
        insets - a Insets object.
      • add

        public void add​(int x,
                        int y,
                        java.awt.Component c)
        Add a component to this panl with Handles.FILL and dx=dy=1
      • add

        public void add​(int x,
                        int y,
                        int handle,
                        java.awt.Component c)
        Add a component to this panel with dx=dy=1
      • add

        public void add​(int x,
                        int y,
                        int dx,
                        int dy,
                        java.awt.Component c)
        Add a component to this panel with Handles.FILL.
      • add

        public void add​(int x,
                        int y,
                        int dx,
                        int dy,
                        int handle,
                        java.awt.Component c)
        Add a component to this panel.