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 TypeClassDescriptionclassThis inner class is marked "public" due to a compiler bug. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JTableHeaderThe JTableHeader that is delegating the painting to this UI.protected MouseInputListenerprotected CellRendererPane -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MouseInputListenerCreates the mouse listener for the JTable.static ComponentUIstatic PortalTableHeaderUIgetPreferredSize(JComponent comp) Return the preferred size for this header.protected voidInitialize JTableHeader properties, e.g.protected voidRegister all keyboard actions on the JTableHeader.protected voidAttaches listeners to the JTableHeader.voidvoidpaint(Graphics g, JComponent c) voidsetSortableColumn(int columnIndex, boolean sortable) Sets individual column to be sortable.voidsetSortableColumns(boolean sortable) Sets all columns to be sortable.protected voidprotected voidprotected voidvoidprotected voidupdateUI()Methods inherited from class javax.swing.plaf.basic.BasicTableHeaderUI
getBaseline, getMaximumSize, getMinimumSize, getRolloverColumn, rolloverColumnUpdatedMethods 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:
createMouseInputListenerin classBasicTableHeaderUI
-
createUI
-
getInstance
-
installUI
- Overrides:
installUIin 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:
installDefaultsin classBasicTableHeaderUI- See Also:
-
installListeners
protected void installListeners()Attaches listeners to the JTableHeader.- Overrides:
installListenersin classBasicTableHeaderUI
-
installKeyboardActions
protected void installKeyboardActions()Register all keyboard actions on the JTableHeader.- Overrides:
installKeyboardActionsin classBasicTableHeaderUI
-
uninstallUI
- Overrides:
uninstallUIin classBasicTableHeaderUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicTableHeaderUI
-
updateUI
protected void updateUI() -
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classBasicTableHeaderUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActionsin 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:
paintin 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:
getPreferredSizein classBasicTableHeaderUI- Parameters:
comp- the header being sized- Returns:
- the preferred size for the header
-