|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel gui.TitledGridBagPanel
public final class TitledGridBagPanel
This is a JPanel that uses a GridBaglayout to show vertical lists of two components.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
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 | |
---|---|
private java.awt.GridBagConstraints |
m_constraints
|
private java.util.Vector |
m_rows
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 | |
---|---|
TitledGridBagPanel()
|
|
TitledGridBagPanel(java.lang.String a_strTitle)
|
|
TitledGridBagPanel(java.lang.String a_strTitle,
java.awt.Insets a_insets)
|
Method Summary | |
---|---|
int |
addDummyRow()
This method is useful if you plan to use your own GridBagLayout for one ore more rows. |
void |
addDummyRows(int a_rows)
This method is useful if you plan to use your own GridBagLayout for one ore more rows. |
int |
addRow(java.awt.Component a_component)
Add a row with one component. |
int |
addRow(java.awt.Component[] a_components,
int[] a_gridwidths)
This method adds several components. |
int |
addRow(java.awt.Component a_component,
java.awt.Component a_otherComponent)
Add a row with two components. |
int |
addRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
java.awt.Component a_thirdComponent)
Add a row with two components. |
int |
addRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
java.awt.Component a_thirdComponent,
java.awt.Component a_fourthComponent)
Add a row with two components. |
int |
addRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
java.awt.Component a_thirdComponent,
java.awt.Component a_fourthComponent,
int a_fill)
|
int |
addRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
int a_fill)
|
java.awt.Insets |
getDefaultInsets()
The default insets that are used if no other insets are given. |
int |
getNextRow()
Returns the position of the next row to add. |
void |
removeInsets()
It is not possible to define concrete insets because of a consistant layout. |
int |
replaceRow(java.awt.Component[] a_components,
int[] a_gridwidths,
int a_rowNumber)
Replaces a row at the given row number. |
int |
replaceRow(java.awt.Component[] a_components,
int[] a_gridwidths,
int a_rowNumber,
int a_fill)
|
int |
replaceRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
java.awt.Component a_thirdComponent,
java.awt.Component a_fourthComponent,
int a_rowNumber)
Replaces a row at the given row number. |
int |
replaceRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
java.awt.Component a_thirdComponent,
java.awt.Component a_fourthComponent,
int a_rowNumber,
int a_fill)
Replaces a row at the given row number. |
int |
replaceRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
java.awt.Component a_thirdComponent,
int a_rowNumber)
Replaces a row at the given row number. |
int |
replaceRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
int a_rowNumber)
Replaces a row at the given row number. |
int |
replaceRow(java.awt.Component a_component,
java.awt.Component a_otherComponent,
int a_rowNumber,
int a_fill)
|
void |
setEnabled(boolean a_bEnabled)
|
void |
setInsets(java.awt.Insets a_insets)
Sets new insets for this panel. |
void |
setLayout(java.awt.LayoutManager a_layoutManager)
Throws an IllegalStateException as the LayoutManager is fixed to java.awt.GridBagLayout. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, hide, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.awt.GridBagConstraints m_constraints
private java.util.Vector m_rows
Constructor Detail |
---|
public TitledGridBagPanel()
public TitledGridBagPanel(java.lang.String a_strTitle)
public TitledGridBagPanel(java.lang.String a_strTitle, java.awt.Insets a_insets)
Method Detail |
---|
public void setInsets(java.awt.Insets a_insets)
a_insets
- new Insets; if null, the panel will use the default
insetspublic java.awt.Insets getDefaultInsets()
public void removeInsets()
public void setEnabled(boolean a_bEnabled)
setEnabled
in class javax.swing.JComponent
public void setLayout(java.awt.LayoutManager a_layoutManager)
setLayout
in class java.awt.Container
a_layoutManager
- LayoutManagerpublic int addRow(java.awt.Component a_component)
a_component
- a Component (may be null)public int addRow(java.awt.Component a_component, java.awt.Component a_otherComponent)
a_component
- a Component (may be null)a_otherComponent
- an other Component (may be null)public int addRow(java.awt.Component a_component, java.awt.Component a_otherComponent, int a_fill)
public int addRow(java.awt.Component a_component, java.awt.Component a_otherComponent, java.awt.Component a_thirdComponent, java.awt.Component a_fourthComponent)
a_component
- a Component (may be null)a_otherComponent
- an other Component (may be null)a_thirdComponent
- a third component (may be null)a_fourthComponent
- a fourth component (may be null)public int addRow(java.awt.Component a_component, java.awt.Component a_otherComponent, java.awt.Component a_thirdComponent, java.awt.Component a_fourthComponent, int a_fill)
public int addRow(java.awt.Component a_component, java.awt.Component a_otherComponent, java.awt.Component a_thirdComponent)
a_component
- a Component (may be null)a_otherComponent
- an other Component (may be null)a_thirdComponent
- a third component (may be null)public int addDummyRow()
public void addDummyRows(int a_rows)
a_rows
- the number of rows you want to fill "manually"public int addRow(java.awt.Component[] a_components, int[] a_gridwidths)
a_components
- Component[]a_gridwidths
- int[]public int replaceRow(java.awt.Component a_component, java.awt.Component a_otherComponent, int a_rowNumber)
a_component
- Componenta_otherComponent
- Componenta_rowNumber
- intpublic int replaceRow(java.awt.Component a_component, java.awt.Component a_otherComponent, int a_rowNumber, int a_fill)
public int replaceRow(java.awt.Component a_component, java.awt.Component a_otherComponent, java.awt.Component a_thirdComponent, int a_rowNumber)
a_component
- Componenta_otherComponent
- Componenta_thirdComponent
- Componenta_rowNumber
- intpublic int replaceRow(java.awt.Component a_component, java.awt.Component a_otherComponent, java.awt.Component a_thirdComponent, java.awt.Component a_fourthComponent, int a_rowNumber, int a_fill)
a_component
- Componenta_otherComponent
- Componenta_thirdComponent
- Componenta_fourthComponent
- Componenta_rowNumber
- inta_fill
- intpublic int replaceRow(java.awt.Component a_component, java.awt.Component a_otherComponent, java.awt.Component a_thirdComponent, java.awt.Component a_fourthComponent, int a_rowNumber)
a_component
- Componenta_otherComponent
- Componenta_thirdComponent
- Componenta_fourthComponent
- Componenta_rowNumber
- intpublic int getNextRow()
public int replaceRow(java.awt.Component[] a_components, int[] a_gridwidths, int a_rowNumber)
a_components
- Component[]a_gridwidths
- int[]a_rowNumber
- intpublic int replaceRow(java.awt.Component[] a_components, int[] a_gridwidths, int a_rowNumber, int a_fill)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |