|
|||||||||
| Home >> All >> novaworx >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
novaworx.gui
Class TablePanel

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
novaworx.gui.TablePanel
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable
- Direct Known Subclasses:
- InformationPage
- public class TablePanel
- extends javax.swing.JPanel
- implements javax.swing.Scrollable
- extends javax.swing.JPanel
The TablePanel container that will layout components
in a rectangular grid similar to HTML tables.
For example, the following is an panel that lays out six buttons:
import java.awt.*;
public class ButtonGrid extends TablePanel {
public TablePanel() {
add( new Button("1") );
add( new Button("2") );
row();
colspan( 2 );
add( new Button("3") );
row();
rowspan( 2 );
add( new Button("4") );
add( new Button("5") );
row();
add( new Button("6") );
done();
}
}
- Version:
- 1.0
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private int |
miColCount
|
private int |
miColspan
|
private int |
miHeight
|
private int |
miPadding
|
private int |
miPreviousColspan
|
private int |
miPreviousHeight
|
private int |
miPreviousRowspan
|
private int |
miPreviousWidth
|
private int |
miRowHeight
|
private int |
miRowspan
|
private int |
miSpacing
|
private int |
miTotalCols
|
private int |
miTotalRows
|
private int |
miWidth
|
private java.awt.GridBagConstraints |
moConstraints
The GridBagConstraints for this panel. |
private java.awt.GridBagLayout |
moGridBag
The GridBag for this panel. |
private java.awt.Component |
moPreviousComponent
The previous component that was added via the add() method. |
| 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.Container |
|
| 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 | |
TablePanel()
Construct a TableGridLayout. |
|
| Method Summary | |
java.awt.Component |
add(java.awt.Component aoComponent)
Override the add method in Container. |
private void |
addPrevious()
Actually add the previous component. |
void |
colspan(int aiSpan)
Set the column span for the next component added. |
void |
done()
All the components are added. |
int |
getColumnCount()
Get the number of columns in the table. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
Part of the Scrollable interface. |
int |
getRowCount()
Get the number of rows in the table. |
int |
getScrollableBlockIncrement(java.awt.Rectangle aoArea,
int aiOrientation,
int aiDirection)
Part of the Scrollable interface. |
boolean |
getScrollableTracksViewportHeight()
Part of the Scrollable interface. |
boolean |
getScrollableTracksViewportWidth()
Part of the Scrollable interface. |
int |
getScrollableUnitIncrement(java.awt.Rectangle aoArea,
int aiOrientation,
int aiDirection)
Part of the Scrollable interface. |
void |
height(int aiHeight)
Set the height for the next component to be added. |
void |
row()
Finish a row in the grid and start a new one. |
void |
rowspan(int aiSpan)
Set the row span for the next component added. |
void |
setBorderSize(int aiBorder)
Set the border. |
void |
setBorderSize(int aiTop,
int aiLeft,
int aiBottom,
int aiRight)
Set the border. |
void |
setCellPadding(int aiPadding)
Set the cell padding. |
void |
setCellSpacing(int aiSpacing)
Set the cell spacing. |
void |
setLayout(java.awt.LayoutManager aoLayout)
Can not change the layout of this component. |
void |
width(int aiWidth)
Set the width for the next component to be added. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
moGridBag
private java.awt.GridBagLayout moGridBag
- The GridBag for this panel.
moConstraints
private java.awt.GridBagConstraints moConstraints
- The GridBagConstraints for this panel.
moPreviousComponent
private java.awt.Component moPreviousComponent
- The previous component that was added via the add() method.
miSpacing
private int miSpacing
miPadding
private int miPadding
miColspan
private int miColspan
miRowspan
private int miRowspan
miPreviousColspan
private int miPreviousColspan
miPreviousRowspan
private int miPreviousRowspan
miWidth
private int miWidth
miHeight
private int miHeight
miPreviousWidth
private int miPreviousWidth
miPreviousHeight
private int miPreviousHeight
miColCount
private int miColCount
miRowHeight
private int miRowHeight
miTotalCols
private int miTotalCols
miTotalRows
private int miTotalRows
| Constructor Detail |
TablePanel
public TablePanel()
- Construct a
TableGridLayout.
| Method Detail |
setBorderSize
public void setBorderSize(int aiBorder)
- Set the border.
setBorderSize
public void setBorderSize(int aiTop,
int aiLeft,
int aiBottom,
int aiRight)
- Set the border.
setCellPadding
public void setCellPadding(int aiPadding)
- Set the cell padding.
setCellSpacing
public void setCellSpacing(int aiSpacing)
- Set the cell spacing.
width
public void width(int aiWidth)
- Set the width for the next component to be added.
height
public void height(int aiHeight)
- Set the height for the next component to be added.
colspan
public void colspan(int aiSpan)
- Set the column span for the next component added.
rowspan
public void rowspan(int aiSpan)
- Set the row span for the next component added.
row
public void row()
- Finish a row in the grid and start a new one.
done
public void done()
- All the components are added.
add
public java.awt.Component add(java.awt.Component aoComponent)
- Override the add method in
Container. The component will not actually be added until the next component is added or therow()ordone()method is called. This allows the table to be laid out correctly.
addPrevious
private void addPrevious()
- Actually add the previous component.
setLayout
public void setLayout(java.awt.LayoutManager aoLayout)
- Can not change the layout of this component.
getRowCount
public int getRowCount()
- Get the number of rows in the table.
getColumnCount
public int getColumnCount()
- Get the number of columns in the table.
getPreferredScrollableViewportSize
public java.awt.Dimension getPreferredScrollableViewportSize()
- Part of the
Scrollableinterface.- Specified by:
getPreferredScrollableViewportSizein interfacejavax.swing.Scrollable
getScrollableUnitIncrement
public int getScrollableUnitIncrement(java.awt.Rectangle aoArea, int aiOrientation, int aiDirection)
- Part of the
Scrollableinterface.- Specified by:
getScrollableUnitIncrementin interfacejavax.swing.Scrollable
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()
- Part of the
Scrollableinterface.- Specified by:
getScrollableTracksViewportWidthin interfacejavax.swing.Scrollable
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()
- Part of the
Scrollableinterface.- Specified by:
getScrollableTracksViewportHeightin interfacejavax.swing.Scrollable
getScrollableBlockIncrement
public int getScrollableBlockIncrement(java.awt.Rectangle aoArea, int aiOrientation, int aiDirection)
- Part of the
Scrollableinterface.- Specified by:
getScrollableBlockIncrementin interfacejavax.swing.Scrollable
|
|||||||||
| Home >> All >> novaworx >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC