|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.painter.AbstractPainter<E> com.alee.extended.painter.BorderPainter<E> com.alee.extended.painter.TitledBorderPainter<E>
E
- component typepublic class TitledBorderPainter<E extends javax.swing.JComponent>
Titled border painter.
BorderPainter
,
AbstractPainter
,
Painter
Field Summary | |
---|---|
protected java.awt.Color |
background
Painter background. |
protected double |
borderCenter
|
protected double |
borderPosition
|
protected java.awt.Shape |
borderShape
|
protected boolean |
clipTitleBackground
Whether to clip background under the title or not. |
protected boolean |
doClip
|
protected boolean |
emptyTitle
|
protected java.awt.FontMetrics |
fontMetrics
|
protected java.awt.Color |
foreground
Title foreground. |
protected int |
h
|
protected int |
titleAlignment
Title text alignment. |
protected int |
titleAreaHeight
|
protected int |
titleBorderGap
Gap between title and border line. |
protected int |
titleOffset
Title side offset. |
protected TitlePosition |
titlePosition
Title position relative to border. |
protected int |
titleSide
Title text display side. |
protected java.lang.String |
titleText
Title text. |
protected int |
titleWidth
|
protected int |
titleX
|
protected int |
titleY
|
protected int |
w
Runtime variables. |
Fields inherited from class com.alee.extended.painter.BorderPainter |
---|
color, round, stroke, width |
Fields inherited from class com.alee.extended.painter.AbstractPainter |
---|
listeners, margin, opaque, preferredSize |
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 | |
---|---|
TitledBorderPainter()
|
|
TitledBorderPainter(java.lang.String titleText)
|
|
TitledBorderPainter(java.lang.String titleText,
int titleAlignment)
|
|
TitledBorderPainter(java.lang.String titleText,
int titleAlignment,
int titleSide)
|
Method Summary | |
---|---|
java.awt.Color |
getBackground()
|
protected java.awt.Shape |
getBorderClipShape()
|
protected double |
getBorderPosition()
|
protected java.awt.Shape |
getBorderShape()
|
java.awt.Color |
getForeground()
|
java.awt.Insets |
getMargin(E c)
Returns margin required for visual data provided by this painter. |
java.awt.Dimension |
getPreferredSize(E c)
Returns preferred size required for proper painting of visual data provided by this painter. |
int |
getTitleAlignment()
|
protected int |
getTitleAreaHeight(E c)
|
int |
getTitleBorderGap()
|
int |
getTitleOffset()
|
TitlePosition |
getTitlePosition()
|
int |
getTitleSide()
|
java.lang.String |
getTitleText()
|
protected int |
getTitleX(E c)
|
protected int |
getTitleY()
|
boolean |
isClipTitleBackground()
|
protected boolean |
isEmptyTitle()
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c)
Paints visual data onto the component graphics. |
void |
setBackground(java.awt.Color background)
|
void |
setClipTitleBackground(boolean clipTitleBackground)
|
void |
setForeground(java.awt.Color foreground)
|
void |
setTitleAlignment(int titleAlignment)
|
void |
setTitleBorderGap(int titleBorderGap)
|
void |
setTitleOffset(int titleOffset)
|
void |
setTitlePosition(TitlePosition titlePosition)
|
void |
setTitleSide(int titleSide)
|
void |
setTitleText(java.lang.String titleText)
|
Methods inherited from class com.alee.extended.painter.BorderPainter |
---|
getBorderShape, getColor, getRound, getStroke, getWidth, setColor, setRound, setStroke, setWidth, updateStroke |
Methods inherited from class com.alee.extended.painter.AbstractPainter |
---|
addPainterListener, install, isOpaque, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int titleOffset
protected int titleBorderGap
protected TitlePosition titlePosition
protected java.awt.Color foreground
protected java.awt.Color background
protected boolean clipTitleBackground
protected int titleAlignment
protected int titleSide
protected java.lang.String titleText
protected int w
protected int h
protected boolean emptyTitle
protected java.awt.FontMetrics fontMetrics
protected int titleAreaHeight
protected int titleWidth
protected int titleX
protected int titleY
protected double borderCenter
protected double borderPosition
protected java.awt.Shape borderShape
protected boolean doClip
Constructor Detail |
---|
public TitledBorderPainter()
public TitledBorderPainter(java.lang.String titleText)
public TitledBorderPainter(java.lang.String titleText, int titleAlignment)
public TitledBorderPainter(java.lang.String titleText, int titleAlignment, int titleSide)
Method Detail |
---|
public int getTitleOffset()
public void setTitleOffset(int titleOffset)
public int getTitleBorderGap()
public void setTitleBorderGap(int titleBorderGap)
public int getTitleSide()
public void setTitleSide(int titleSide)
public int getTitleAlignment()
public void setTitleAlignment(int titleAlignment)
public TitlePosition getTitlePosition()
public void setTitlePosition(TitlePosition titlePosition)
public java.awt.Color getForeground()
public void setForeground(java.awt.Color foreground)
public java.awt.Color getBackground()
public void setBackground(java.awt.Color background)
public boolean isClipTitleBackground()
public void setClipTitleBackground(boolean clipTitleBackground)
public java.lang.String getTitleText()
public void setTitleText(java.lang.String titleText)
public java.awt.Insets getMargin(E c)
BorderPainter
getMargin
in interface Painter<E extends javax.swing.JComponent>
getMargin
in class BorderPainter<E extends javax.swing.JComponent>
c
- component to process
public java.awt.Dimension getPreferredSize(E c)
BorderPainter
getPreferredSize
in interface Painter<E extends javax.swing.JComponent>
getPreferredSize
in class BorderPainter<E extends javax.swing.JComponent>
c
- component to process
public void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c)
BorderPainter
paint
in interface Painter<E extends javax.swing.JComponent>
paint
in class BorderPainter<E extends javax.swing.JComponent>
g2d
- component graphicsbounds
- bounds for painter visual datac
- component to processprotected int getTitleX(E c)
protected int getTitleY()
protected double getBorderPosition()
protected int getTitleAreaHeight(E c)
protected boolean isEmptyTitle()
protected java.awt.Shape getBorderShape()
protected java.awt.Shape getBorderClipShape()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |