public class RowColumnContainer extends JComponent
RowColumnLayout,
Serialized FormJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected float[] |
ph
Normalize height of the components in column.
|
protected float[] |
pw
Normalized width of the columns.
|
protected RowColumnLayout |
row_col_layout
RowColumnLayout
|
protected int[] |
rows
number of component in column
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
RowColumnContainer()
Constructs a new RowColumnContainer with one row an column.
|
RowColumnContainer(int[] rows,
Component[] c)
Constructs a new RowColumnContainer with a defined number of column and
componet in column, and array of component to add.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component[] c)
Add componets to the container.
|
void |
add(Component c,
int row,
int col)
Adds a specific component in row column position, if row, col position
position is not present in row column grid, the grid is modified to add new
componet.
|
int |
getColumns()
Get number of columns.
|
int |
getComponentIndex(Component c)
Gets the index of the component in this container.
|
int |
getComponentIndex(int row,
int col)
Gets the (row, col) component index in this container.
|
int |
getComponentNumber()
Returns the number of componet to add to this container.
|
Point |
getComponentPosition(Component c)
Get (row , col) position of the component in the container
|
int |
getComponentsInColumn(int col)
Get defined number of component in column col.
|
int[] |
getComponentsInColumns()
Get defined number of component in columns
|
int[] |
getComponetNumInColumns() |
Component |
getGridComponent(int n)
Gets the nth user added component in this container.
|
Component |
getGridComponent(int row,
int col)
Gets the (row, col) component in this container.
|
int |
getGridComponentCount()
Gets the number of components, added by user, in this panel.
|
Component |
getMaximizeComponent() |
float[] |
getNormalizedHeight() |
float[] |
getNormalizedWidth() |
Point |
getSplitPosition() |
boolean |
isMaximize() |
void |
maximizeComponent(Component c) |
void |
removeComponent(Component c)
Removes the specified component from this container.
|
void |
removeComponent(int row,
int col)
Removes component in (row, col) position from this container.
|
void |
repaintAll()
Repaint all added component.
|
void |
resetMaximizeComponent() |
void |
resetSplitPosition() |
void |
setRowColumn(int[] rows)
Set new grid configuration.
|
int |
splitContainer(Component c)
Add component to the container.
|
void |
update()
Update RowColumnLayout.
|
void |
update(float[] ph,
float[] pw)
Update RowColumnLayout with defined row component height and column width.
|
void |
update(int[] rows,
Component[] c)
Update container with new vector of values of components in columns.
|
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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, 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, setLayout, transferFocusDownCycle, validate, validateTreeaction, 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, 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, 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, transferFocusBackward, transferFocusUpCycleprotected RowColumnLayout row_col_layout
RowColumnLayoutprotected int[] rows
protected float[] ph
RowColumnLayoutprotected float[] pw
RowColumnLayoutpublic RowColumnContainer()
public RowColumnContainer(int[] rows,
Component[] c)
rows - an array of number of component in columncolumns - number of columnsc - an array of componet to addpublic void add(Component[] c)
c - an array of componentpublic void add(Component c, int row, int col)
c - the component to be addedrow - component position in columncol - column position of the componentpublic int getColumns()
public int getComponentIndex(Component c)
c - componentpublic int getComponentIndex(int row,
int col)
row - component index in the columncol - column index of the componentpublic int getComponentNumber()
public Point getComponentPosition(Component c)
c - componetpublic int getComponentsInColumn(int col)
col - number of columnpublic int[] getComponentsInColumns()
public int[] getComponetNumInColumns()
public Component getGridComponent(int n)
n - the index of the component to get.ArrayIndexOutOfBoundsException - if the nth value does
not exist. Need not be called from
AWT thread.public Component getGridComponent(int row, int col)
row - component index in the columncol - column index of the componentpublic int getGridComponentCount()
public Component getMaximizeComponent()
public float[] getNormalizedHeight()
public float[] getNormalizedWidth()
public Point getSplitPosition()
public boolean isMaximize()
public void maximizeComponent(Component c)
public void removeComponent(Component c)
c - the component to be removedpublic void removeComponent(int row,
int col)
row - component index in the columncol - column index of the componentpublic void repaintAll()
public void resetMaximizeComponent()
public void resetSplitPosition()
public void setRowColumn(int[] rows)
rows - an array of number of component in columnpublic int splitContainer(Component c)
c - component to addpublic void update()
RowColumnLayoutpublic void update(float[] ph,
float[] pw)
ph - Vector of normalize height of component. The sum of ph[x] of the
objects in a column must be 1.pw - Vector of normalize width of the culomn. The sum of pw[x] must be 1RowColumnLayoutpublic void update(int[] rows,
Component[] c)
rows - an array of number of component in columnc - an array of new componet to addCopyright © 2023. All rights reserved.