Package com.portal.pfc.ui.plaf
Class PortalTableHeaderUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TableHeaderUI
javax.swing.plaf.basic.BasicTableHeaderUI
com.portal.pfc.ui.plaf.PortalTableHeaderUI
Portal look and feel implementation for a TableHeader.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
This inner class is marked "public" due to a compiler bug. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JTableHeader
The JTableHeader that is delegating the painting to this UI.protected MouseInputListener
protected CellRendererPane
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MouseInputListener
Creates the mouse listener for the JTable.static ComponentUI
static PortalTableHeaderUI
getPreferredSize
(JComponent comp) Return the preferred size for this header.protected void
Initialize JTableHeader properties, e.g.protected void
Register all keyboard actions on the JTableHeader.protected void
Attaches listeners to the JTableHeader.void
void
paint
(Graphics g, JComponent c) void
setSortableColumn
(int columnIndex, boolean sortable) Sets individual column to be sortable.void
setSortableColumns
(boolean sortable) Sets all columns to be sortable.protected void
protected void
protected void
void
protected void
updateUI()
Methods inherited from class javax.swing.plaf.basic.BasicTableHeaderUI
getBaseline, getMaximumSize, getMinimumSize, getRolloverColumn, rolloverColumnUpdated
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior, update
-
Field Details
-
header
The JTableHeader that is delegating the painting to this UI. -
rendererPane
-
mouseInputListener
-
-
Constructor Details
-
PortalTableHeaderUI
public PortalTableHeaderUI()
-
-
Method Details
-
createMouseInputListener
Creates the mouse listener for the JTable.- Overrides:
createMouseInputListener
in classBasicTableHeaderUI
-
createUI
-
getInstance
-
installUI
- Overrides:
installUI
in classBasicTableHeaderUI
-
installDefaults
protected void installDefaults()Initialize JTableHeader properties, e.g. 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.- Overrides:
installDefaults
in classBasicTableHeaderUI
- See Also:
-
installListeners
protected void installListeners()Attaches listeners to the JTableHeader.- Overrides:
installListeners
in classBasicTableHeaderUI
-
installKeyboardActions
protected void installKeyboardActions()Register all keyboard actions on the JTableHeader.- Overrides:
installKeyboardActions
in classBasicTableHeaderUI
-
uninstallUI
- Overrides:
uninstallUI
in classBasicTableHeaderUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicTableHeaderUI
-
updateUI
protected void updateUI() -
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicTableHeaderUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActions
in classBasicTableHeaderUI
-
setSortableColumns
public void setSortableColumns(boolean sortable) Sets all columns to be sortable. -
setSortableColumn
public void setSortableColumn(int columnIndex, boolean sortable) Sets individual column to be sortable. -
paint
- Overrides:
paint
in classBasicTableHeaderUI
-
getPreferredSize
Return the preferred size for this header. The height is retrieved from the maximum height of all the columns used. The width is the total width from all the columns used.- Overrides:
getPreferredSize
in classBasicTableHeaderUI
- Parameters:
comp
- the header being sized- Returns:
- the preferred size for the header
-