javax.swing.JTable .
| Modifier and Type | Class and Description |
|---|---|
| private static class | SynthTableUI.
The renderer installed by the UI to render the boolean data. |
| private class | SynthTableUI.
The |
| Modifier and Type | Field and Description |
|---|---|
| private Color | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private TableCellRenderer | |
| private boolean | |
| private boolean | |
| private SynthStyle | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ComponentUI | Returns: the UI objectcomponent to create UI object for c)Hides javax. Creates a new UI object for the given component. |
| private Rectangle | |
| public SynthContext | getContext(JComponent c)
Implements javax. Returns the Context for the specified component. |
| private SynthContext | |
| private Rectangle | |
| private Rectangle | |
| protected void | installDefaults()
Overrides javax. Initializes JTable properties, such as font, foreground, and background. |
| protected void | installListeners()
Overrides javax. Attaches listeners to the JTable. |
| private TableCellRenderer | |
| public void | paint(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Paints the specified component according to the Look and Feel. |
| protected void | paint(SynthContext
context for the component being painted context, Graphics the g)Graphics object used for paintingPaints the specified component. |
| public void | paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Implements javax. Paints the border. |
| private void | |
| private void | |
| private void | paintDraggedArea(SynthContext context, Graphics g, int rMin, int rMax, TableColumn draggedColumn, int distance)
|
| private void | |
| private void | |
| public void | propertyChange(PropertyChangeEvent event)
Implements java. This method gets called when a bound property is changed. |
| protected void | uninstallDefaults()
Overrides javax. Uninstalls default properties. |
| protected void | uninstallListeners()
Overrides javax. Unregisters listeners. |
| public void | update(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Notifies this UI delegate to repaint the specified component. |
| private void | |
| private int |
| alternateColor | back to summary |
|---|---|
| private Color alternateColor | |
| booleanRenderer | back to summary |
|---|---|
| private TableCellRenderer booleanRenderer | |
| dateRenderer | back to summary |
|---|---|
| private TableCellRenderer dateRenderer | |
| doubleRender | back to summary |
|---|---|
| private TableCellRenderer doubleRender | |
| floatRenderer | back to summary |
|---|---|
| private TableCellRenderer floatRenderer | |
| iconRenderer | back to summary |
|---|---|
| private TableCellRenderer iconRenderer | |
| imageIconRenderer | back to summary |
|---|---|
| private TableCellRenderer imageIconRenderer | |
| numberRenderer | back to summary |
|---|---|
| private TableCellRenderer numberRenderer | |
| objectRenderer | back to summary |
|---|---|
| private TableCellRenderer objectRenderer | |
| showHorizLines | back to summary |
|---|---|
| private boolean showHorizLines | |
| showVertLines | back to summary |
|---|---|
| private boolean showVertLines | |
| style | back to summary |
|---|---|
| private SynthStyle style | |
| useTableColors | back to summary |
|---|---|
| private boolean useTableColors | |
| useUIBorder | back to summary |
|---|---|
| private boolean useUIBorder | |
| SynthTableUI | back to summary |
|---|---|
| public SynthTableUI() Constructs a | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Creates a new UI object for the given component.
| |
| extendRect | back to summary |
|---|---|
| private Rectangle extendRect(Rectangle rect, boolean horizontal) | |
| getContext | back to summary |
|---|---|
| public SynthContext getContext(JComponent c) Implements javax. Doc from javax. Returns the Context for the specified component.
| |
| getContext | back to summary |
|---|---|
| private SynthContext getContext(JComponent c, int state) | |
| getHDropLineRect | back to summary |
|---|---|
| private Rectangle getHDropLineRect(JTable. | |
| getVDropLineRect | back to summary |
|---|---|
| private Rectangle getVDropLineRect(JTable. | |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults() Overrides javax. Initializes JTable properties, such as font, foreground, and background. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null. | |
| installListeners | back to summary |
|---|---|
| protected void installListeners() Overrides javax. Attaches listeners to the JTable.
| |
| installRendererIfPossible | back to summary |
|---|---|
| private TableCellRenderer installRendererIfPossible(Class<?> objectClass, TableCellRenderer renderer) | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. Paints the specified component according to the Look and Feel. This method is not used by Synth Look and Feel.
Painting is handled by the
| |
| paint | back to summary |
|---|---|
| protected void paint(SynthContext context, Graphics g) Paints the specified component.
| |
| paintBorder | back to summary |
|---|---|
| public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) Implements javax. Doc from javax. Paints the border.
| |
| paintCell | back to summary |
|---|---|
| private void paintCell(SynthContext context, Graphics g, Rectangle cellRect, int row, int column) | |
| paintCells | back to summary |
|---|---|
| private void paintCells(SynthContext context, Graphics g, int rMin, int rMax, int cMin, int cMax) | |
| paintDraggedArea | back to summary |
|---|---|
| private void paintDraggedArea(SynthContext context, Graphics g, int rMin, int rMax, TableColumn draggedColumn, int distance) | |
| paintDropLines | back to summary |
|---|---|
| private void paintDropLines(SynthContext context, Graphics g) | |
| paintGrid | back to summary |
|---|---|
| private void paintGrid(SynthContext context, Graphics g, int rMin, int rMax, int cMin, int cMax) | |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent event) Implements java. Doc from java. This method gets called when a bound property is changed.
| |
| uninstallDefaults | back to summary |
|---|---|
| protected void uninstallDefaults() Overrides javax. Doc from javax. Uninstalls default properties.
| |
| uninstallListeners | back to summary |
|---|---|
| protected void uninstallListeners() Overrides javax. Doc from javax. Unregisters listeners.
| |
| update | back to summary |
|---|---|
| public void update(Graphics g, JComponent c) Overrides javax. Notifies this UI delegate to repaint the specified component.
This method paints the component background, then calls
the In general, this method does not need to be overridden by subclasses.
All Look and Feel rendering code should reside in the
| |
| updateStyle | back to summary |
|---|---|
| private void updateStyle(JTable c) | |
| viewIndexForColumn | back to summary |
|---|---|
| private int viewIndexForColumn(TableColumn aColumn) Hides javax. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Component | getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
Implements javax. Returns the component used for drawing the cell. |
| public boolean | isOpaque()
Overrides javax. Returns true if this component is completely opaque. |
| private Color |
| isRowSelected | back to summary |
|---|---|
| private boolean isRowSelected | |
| SynthBooleanTableCellRenderer | back to summary |
|---|---|
| public SynthBooleanTableCellRenderer() | |
| getTableCellRendererComponent | back to summary |
|---|---|
| public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Implements javax. Doc from javax. Returns the component used for drawing the cell. This method is used to configure the renderer appropriately before drawing.
The
JTable.DropLocation dropLocation = table.getDropLocation();
if (dropLocation != null
&& !dropLocation.isInsertRow()
&& !dropLocation.isInsertColumn()
&& dropLocation.getRow() == row
&& dropLocation.getColumn() == column) {
// this cell represents the current drop location
// so render it specially, perhaps with a different color
}
During a printing operation, this method will be called with
| |
| isOpaque | back to summary |
|---|---|
| public boolean isOpaque() Overrides javax. Doc from javax. Returns true if this component is completely opaque. An opaque component paints every pixel within its rectangular bounds. A non-opaque component paints only a subset of its pixels or none at all, allowing the pixels underneath it to "show through". Therefore, a component that does not fully paint its pixels provides a degree of transparency. Subclasses that guarantee to always completely paint their contents should override this method and return true. | |
| unwrap | back to summary |
|---|---|
| private Color unwrap(Color c) | |
DefaultTableCellRenderer installed by the UI.
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private Object | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public String | |
| public Component | getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
Overrides javax. Implements javax. Returns the default table cell renderer. |
| public boolean | isOpaque()
Overrides javax. Overridden for performance reasons. |
| public void | |
| public void | |
| public void | setOpaque(boolean isOpaque)
Overrides javax. If true the component paints every pixel within its bounds. |
| dateFormat | back to summary |
|---|---|
| private Object dateFormat | |
| numberFormat | back to summary |
|---|---|
| private Object numberFormat | |
| opaque | back to summary |
|---|---|
| private boolean opaque | |
| SynthTableCellRenderer | back to summary |
|---|---|
| private SynthTableCellRenderer() | |
| configureValue | back to summary |
|---|---|
| private void configureValue(Object value, Class<?> columnClass) | |
| getName | back to summary |
|---|---|
| public String getName() Overrides java. Doc from java. Gets the name of the component. | |
| getTableCellRendererComponent | back to summary |
|---|---|
| public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Overrides javax. Implements javax. Doc from javax. Returns the default table cell renderer.
During a printing operation, this method will be called with
| |
| isOpaque | back to summary |
|---|---|
| public boolean isOpaque() Overrides javax. Doc from javax. Overridden for performance reasons. See the Implementation Note for more information. | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g) Overrides javax. Doc from javax. Invoked by Swing to draw components.
Applications should not invoke
This method actually delegates the work of painting to three
protected methods: | |
| setBorder | back to summary |
|---|---|
| public void setBorder(Border b) Overrides javax. Doc from javax. Sets the border of this component. The
Although technically you can set the border on any object
that inherits from This is a bound property. | |
| setOpaque | back to summary |
|---|---|
| public void setOpaque(boolean isOpaque) Overrides javax. Doc from javax. If true the component paints every pixel within its bounds. Otherwise, the component may not paint some or all of its pixels, allowing the underlying pixels to show through.
The default value of this property is false for | |