|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI
javax.swing.plaf.metal.MetalTabbedPaneUI
org.compiere.plaf.CompiereTabbedPaneUI
public class CompiereTabbedPaneUI
Same implementation detail as in AdempierePanelUI. Additional handling of dwawing tabs.
CompierePanelUI| Nested Class Summary | |
|---|---|
class |
CompiereTabbedPaneUI.TabbedPaneLayout
Layout Manager to overwrite TabRect size |
| Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
|---|
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabSelectionHandler |
| Field Summary |
|---|
| Fields inherited from class javax.swing.plaf.metal.MetalTabbedPaneUI |
|---|
minTabWidth, selectColor, selectHighlight, tabAreaBackground |
| Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
|---|
calcRect, contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, upKey |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
CompiereTabbedPaneUI()
|
|
| Method Summary | |
|---|---|
protected int |
calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
Calculate TabHeight |
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
FontMetrics metrics)
Calculate Tab Width. |
protected LayoutManager |
createLayoutManager()
Create Layout Manager to size & position tabs |
static ComponentUI |
createUI(JComponent c)
Static Create UI |
protected void |
installDefaults()
Install Defaults |
protected void |
layoutLabel(int tabPlacement,
FontMetrics metrics,
int tabIndex,
String title,
Icon icon,
Rectangle tabRect,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected)
Layout Label |
void |
paint(Graphics g,
JComponent c)
Paint it |
protected void |
paintContentBorder(Graphics g,
int tabPlacement,
int selectedIndex)
Paint Content Border (overwriting BasicTabbedPanelUI) Uses Color from actual Tab (not from TabbedPane) |
protected void |
paintContentBorderBottomEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
Paint bottom content area edge |
protected void |
paintContentBorderLeftEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
Paint left content border edge |
protected void |
paintContentBorderRightEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
Paint right Contenr border edge |
protected void |
paintLeftTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
Paint Border of Left Tab. |
protected void |
paintRightTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
Paint Border of Right Tab. |
protected void |
paintTabBackground(Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
Paint the actual Tab Background. |
protected void |
paintText(Graphics g,
int tabPlacement,
Font font,
FontMetrics metrics,
int tabIndex,
String title,
Rectangle textRect,
boolean isSelected)
Paint Tab |
protected void |
paintTopTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
Paint Top Tab Border |
protected boolean |
shouldFillGap(int currentRun,
int tabIndex,
int x,
int y)
Fill Tab gap triangle (no) |
void |
update(Graphics g,
JComponent c)
Update - This method is invoked by JComponent when the specified
component is being painted. |
| Methods inherited from class javax.swing.plaf.metal.MetalTabbedPaneUI |
|---|
calculateMaxTabHeight, getBaselineOffset, getColorForGap, getTabLabelShiftX, getTabLabelShiftY, getTabRunOverlay, paintBottomTabBorder, paintContentBorderTopEdge, paintFocusIndicator, paintHighlightBelowTab, paintTabBorder, shouldPadTabRun, shouldRotateTabRuns |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompiereTabbedPaneUI()
| Method Detail |
|---|
public static ComponentUI createUI(JComponent c)
c - Component
protected void installDefaults()
installDefaults in class MetalTabbedPaneUI
public void update(Graphics g,
JComponent c)
JComponent when the specified
component is being painted.
By default this method will fill the specified component with
its background color (if its opaque property is
true) and then immediately call paint.
update in class MetalTabbedPaneUIg - the Graphics context in which to paintc - the component being paintedpaint(java.awt.Graphics, javax.swing.JComponent),
JComponent.paintComponent(java.awt.Graphics)
public void paint(Graphics g,
JComponent c)
paint in class MetalTabbedPaneUIg - graphicsc - component
protected void paintTabBackground(Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
Based on MetalTabbedPaneUI.paintTabBackground: Differences: - Color based on primary Background of Tab - Selected Tab is painted
selected not sel
top ////////// ////////// (lighter)
++++++++++ (flat/darker)
bottom ////////// (flat/lighter)
++++++++++ ++++++++++ (darker)
sides ////////// (flat/ligher)
++++++++++ (flat/darker)
paintTabBackground in class MetalTabbedPaneUIg - graphicstabPlacement - tab placementtabIndex - tab indexx - xy - yw - widthh - heightisSelected - selected
protected void paintContentBorder(Graphics g,
int tabPlacement,
int selectedIndex)
paintContentBorder in class BasicTabbedPaneUIg - graphicstabPlacement - tab placementselectedIndex - index
protected void paintContentBorderLeftEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderLeftEdge in class MetalTabbedPaneUIg - graphicstabPlacement - tab placementselectedIndex - indexx - xy - yw - widthh - height
protected void paintContentBorderBottomEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderBottomEdge in class MetalTabbedPaneUIg - graphicstabPlacement - tab placementselectedIndex - indexx - xy - yw - widthh - height
protected void paintContentBorderRightEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderRightEdge in class MetalTabbedPaneUIg - graphicstabPlacement - tab placementselectedIndex - indexx - xy - yw - widthh - height
protected boolean shouldFillGap(int currentRun,
int tabIndex,
int x,
int y)
shouldFillGap in class MetalTabbedPaneUIcurrentRun - current runtabIndex - tab indexx - xy - y
protected void paintTopTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
paintTopTabBorder in class MetalTabbedPaneUItabIndex - indexg - graphicsx - xy - yw - widthh - heightbtm - bottomrght - rightisSelected - selected
protected void paintLeftTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
paintLeftTabBorder in class MetalTabbedPaneUItabIndex - indexg - graphicsx - xy - yw - widthh - heightbtm - bottomrght - rightisSelected - selected
protected void paintRightTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
paintRightTabBorder in class MetalTabbedPaneUItabIndex - indexg - graphicsx - xy - yw - widthh - heightbtm - bottomrght - rightisSelected - selected
protected int calculateTabWidth(int tabPlacement,
int tabIndex,
FontMetrics metrics)
calculateTabWidth in class BasicTabbedPaneUItabPlacement - tab placementtabIndex - tab indexmetrics - metcics
protected int calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
calculateTabHeight in class BasicTabbedPaneUItabPlacement - tab placementtabIndex - tab indexfontHeight - font height
protected void layoutLabel(int tabPlacement,
FontMetrics metrics,
int tabIndex,
String title,
Icon icon,
Rectangle tabRect,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected)
layoutLabel in class BasicTabbedPaneUItabPlacement - tab placementmetrics - fint metricstabIndex - tab indextitle - titleicon - icontabRect - tab boundsiconRect - icon boundstextRect - text boundsisSelected - selected
protected void paintText(Graphics g,
int tabPlacement,
Font font,
FontMetrics metrics,
int tabIndex,
String title,
Rectangle textRect,
boolean isSelected)
paintText in class BasicTabbedPaneUIg - graphicstabPlacement - tab placementfont - fontmetrics - font metricstabIndex - tab indextitle - titletextRect - text boundsisSelected - selectedprotected LayoutManager createLayoutManager()
createLayoutManager in class MetalTabbedPaneUI
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||