public class TearOffTab extends Tab
Modifier and Type | Field and Description |
---|---|
protected Rectangle[] |
buttons |
protected boolean |
hideLabelUnlessSelected |
protected Icon |
icon |
protected static int |
ICON_GAP |
protected String |
label |
protected static int |
LABEL_MARGIN_HEIGHT |
protected static int |
LABEL_MARGIN_WIDTH |
protected boolean |
rotateIcon |
protected static int |
TEAR_OFF_THICKNESS |
Modifier | Constructor and Description |
---|---|
|
TearOffTab(String label,
Icon icon,
Component component,
boolean atStart) |
|
TearOffTab(String label,
Icon icon,
Component component,
boolean atStart,
boolean hideLabelUnlessSelected,
boolean rotateIcon) |
protected |
TearOffTab(String label,
Icon icon,
Component component,
boolean atStart,
boolean hideLabelUnlessSelected,
boolean rotateIcon,
int buttonCount) |
Modifier and Type | Method and Description |
---|---|
Rectangle[] |
getButtons() |
protected void |
getButtons(Rectangle[] buttons) |
Icon |
getIcon() |
Dimension |
getIntrinsicSize() |
String |
getLabel() |
protected Font |
getLabelFont() |
protected int |
getLabelHeight(FontMetrics metrics) |
protected int |
getLabelWidth(FontMetrics metrics) |
String |
getToolTip() |
boolean |
isHidingLabelUnlessSelected() |
boolean |
isRotatingIcon() |
void |
mousePressed(MouseEvent event,
int buttonIndex) |
void |
mouseReleased(MouseEvent event,
int buttonIndex) |
void |
paint(Graphics g,
Color backgroundColor,
Color borderColor,
Color highlightColor,
Color shadowColor,
Color foregroundColor) |
protected void |
paintLabel(Graphics g,
int x,
int y,
int h,
Font font,
FontMetrics metrics,
Color color,
Color backgroundColor) |
protected void |
paintTearOff(Graphics g,
int x1,
int y1,
int x2,
int y2,
Color backgroundColor,
Color borderColor,
Color highlightColor,
Color shadowColor,
Color foregroundColor) |
void |
setHidingLabelUnlessSelected(boolean hide) |
void |
setRotatingIcon(boolean rotate) |
protected boolean |
showLabel() |
drawSeparator, getBackground, getComponent, getPane, getUserData, isAtStart, isSelected, paintSimpleTab, setUserData, toString
protected String label
protected Icon icon
protected boolean hideLabelUnlessSelected
protected boolean rotateIcon
protected Rectangle[] buttons
protected static int ICON_GAP
protected static int LABEL_MARGIN_WIDTH
protected static int LABEL_MARGIN_HEIGHT
protected static int TEAR_OFF_THICKNESS
public TearOffTab(String label, Icon icon, Component component, boolean atStart, boolean hideLabelUnlessSelected, boolean rotateIcon)
public void setHidingLabelUnlessSelected(boolean hide)
public boolean isHidingLabelUnlessSelected()
public void setRotatingIcon(boolean rotate)
public boolean isRotatingIcon()
public String getToolTip()
getToolTip
in class Tab
protected boolean showLabel()
public Dimension getIntrinsicSize()
getIntrinsicSize
in class Tab
protected Font getLabelFont()
protected int getLabelWidth(FontMetrics metrics)
protected int getLabelHeight(FontMetrics metrics)
public void paint(Graphics g, Color backgroundColor, Color borderColor, Color highlightColor, Color shadowColor, Color foregroundColor)
protected void paintLabel(Graphics g, int x, int y, int h, Font font, FontMetrics metrics, Color color, Color backgroundColor)
protected void paintTearOff(Graphics g, int x1, int y1, int x2, int y2, Color backgroundColor, Color borderColor, Color highlightColor, Color shadowColor, Color foregroundColor)
public Rectangle[] getButtons()
getButtons
in class Tab
protected void getButtons(Rectangle[] buttons)
public void mousePressed(MouseEvent event, int buttonIndex)
mousePressed
in class Tab
public void mouseReleased(MouseEvent event, int buttonIndex)
mouseReleased
in class Tab