|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.screen.ScreenDockWindowBorder
@ColorCodes(value={"station.screen.border","station.screen.border.line","station.screen.border.line.highlight.inner","station.screen.border.line.highlight.outer","station.screen.border.line.shadow.inner","station.screen.border.line.shadow.outer","station.screen.border.highlight.inner","station.screen.border.highlight.outer","station.screen.border.shadow.inner","station.screen.border.shadow.outer","station.screen.border.hover","station.screen.border.highlight.inner.hover","station.screen.border.highlight.outer.hover","station.screen.border.shadow.inner.hover","station.screen.border.shadow.outer.hover","station.screen.border.selected","station.screen.border.highlight.inner.selected","station.screen.border.highlight.outer.selected","station.screen.border.shadow.inner.selected","station.screen.border.shadow.outer.selected"}) public class ScreenDockWindowBorder
This border can be used by ScreenDockWindow
s to paint a border. The border itself offers methods
to paint indications whether the user currently moves or presses the mouse over it. The states however have to
be set by window itself.
Nested Class Summary | |
---|---|
protected class |
ScreenDockWindowBorder.BorderColor
A DockColor representing a color used by this border. |
static class |
ScreenDockWindowBorder.Position
various positions where the user can grab this border |
Constructor Summary | |
---|---|
ScreenDockWindowBorder(ScreenDockWindow window,
javax.swing.JComponent target)
Creates a new border |
Method Summary | |
---|---|
protected java.awt.Color |
defaultModify(java.awt.Color color,
boolean inner,
boolean shadow)
Creates colors for parts of this border based on some basic color. |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
|
DockController |
getController()
Gets the DockController which is currently associated with this border |
int |
getCornerSize()
Gets the size of the corners in pixels. |
protected java.awt.Color |
getHoverColor(java.awt.Component c)
Gets the base color used for painting a region under the mouse |
protected java.awt.Color |
getHoverColor(java.awt.Component c,
boolean inner,
boolean shadow)
Gets a color to paint some part of this border that is under the mouse. |
protected java.awt.Color |
getLine(java.awt.Component c)
Gets the color that should be used for painting a line. |
protected java.awt.Color |
getLine(java.awt.Component c,
boolean inner,
boolean shadow)
Gets the color that should be used for painting a line. |
int |
getMoveSize()
Gets the size of the area at the top that can be grabbed in pixels. |
protected java.awt.Color |
getNormalColor(java.awt.Component c)
Gets a color to paint some part of this border. |
protected java.awt.Color |
getNormalColor(java.awt.Component c,
boolean inner,
boolean shadow)
Gets a color to paint some part of this. |
protected java.awt.Color |
getSelectedColor(java.awt.Component c)
Gets a color to paint some part of this border that is under the pressed mouse. |
protected java.awt.Color |
getSelectedColor(java.awt.Component c,
boolean inner,
boolean shadow)
Gets a color to paint some part of this border that is under the pressed mouse. |
boolean |
isBorderOpaque()
|
boolean |
isDrawDividers()
Tells whether dividing lines are painted |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
void |
setController(DockController controller)
Sets the DockController which should be monitored for receiving colors. |
void |
setCornerSize(int cornerSize)
Sets the size of the corners in pixels. |
void |
setDrawDividers(boolean drawDividers)
Sets whether dividing lines are to be painted or not |
void |
setMouseOver(ScreenDockWindowBorder.Position mouseOver)
Sets where the mouse is currently hovering. |
void |
setMousePressed(ScreenDockWindowBorder.Position mousePressed)
Sets where the mouse is currently pressed. |
void |
setMoveSize(int moveSize)
Sets the size of the area at the top that can be grabbed and used to move the window. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ScreenDockWindowBorder.BorderColor colorLine
protected final ScreenDockWindowBorder.BorderColor colorLineHighlightInner
protected final ScreenDockWindowBorder.BorderColor colorLineHighlightOuter
protected final ScreenDockWindowBorder.BorderColor colorLineShadowInner
protected final ScreenDockWindowBorder.BorderColor colorLineShadowOuter
protected final ScreenDockWindowBorder.BorderColor color
protected final ScreenDockWindowBorder.BorderColor colorHighlightInner
protected final ScreenDockWindowBorder.BorderColor colorHighlightOuter
protected final ScreenDockWindowBorder.BorderColor colorShadowInner
protected final ScreenDockWindowBorder.BorderColor colorShadowOuter
protected final ScreenDockWindowBorder.BorderColor colorHover
protected final ScreenDockWindowBorder.BorderColor colorHighlightInnerHover
protected final ScreenDockWindowBorder.BorderColor colorHighlightOuterHover
protected final ScreenDockWindowBorder.BorderColor colorShadowInnerHover
protected final ScreenDockWindowBorder.BorderColor colorShadowOuterHover
protected final ScreenDockWindowBorder.BorderColor colorSelected
protected final ScreenDockWindowBorder.BorderColor colorHighlightInnerSelected
protected final ScreenDockWindowBorder.BorderColor colorHighlightOuterSelected
protected final ScreenDockWindowBorder.BorderColor colorShadowInnerSelected
protected final ScreenDockWindowBorder.BorderColor colorShadowOuterSelected
Constructor Detail |
---|
public ScreenDockWindowBorder(ScreenDockWindow window, javax.swing.JComponent target)
window
- the window for which this border is usedtarget
- the component which is painted by thisMethod Detail |
---|
public void setController(DockController controller)
DockController
which should be monitored for receiving colors.
controller
- the new controller, can be null
public DockController getController()
DockController
which is currently associated with this border
null
public void setCornerSize(int cornerSize)
cornerSize
- the size in pixels, at least 0public int getCornerSize()
public void setMoveSize(int moveSize)
moveSize
- the size, at least 0public int getMoveSize()
public void setDrawDividers(boolean drawDividers)
drawDividers
- true
if lines should be paintedpublic boolean isDrawDividers()
true
if lines are paintedpublic void setMouseOver(ScreenDockWindowBorder.Position mouseOver)
mouseOver
- the position, null
equals ScreenDockWindowBorder.Position.NOTHING
public void setMousePressed(ScreenDockWindowBorder.Position mousePressed)
mousePressed
- the position, null
equals ScreenDockWindowBorder.Position.NOTHING
public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
public boolean isBorderOpaque()
isBorderOpaque
in interface javax.swing.border.Border
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
protected java.awt.Color getLine(java.awt.Component c)
c
- the component for which the line is painted
null
protected java.awt.Color getLine(java.awt.Component c, boolean inner, boolean shadow)
c
- the component for which the line is paintedinner
- whether the inner or the outer rectangle is paintedshadow
- whether the shadow or the highlight part is painted
null
protected java.awt.Color getHoverColor(java.awt.Component c)
c
- the component for which the border is painted
null
protected java.awt.Color getHoverColor(java.awt.Component c, boolean inner, boolean shadow)
c
- the component for which the border is paintedinner
- whether the inner or the outer rectangle is paintedshadow
- whether the shadow or the highlight part is painted
null
protected java.awt.Color getSelectedColor(java.awt.Component c)
c
- the component for which the border is painted
null
protected java.awt.Color getSelectedColor(java.awt.Component c, boolean inner, boolean shadow)
c
- the component for which the border is paintedinner
- whether the inner or the outer rectangle is paintedshadow
- whether the shadow or the highlight part is painted
null
protected java.awt.Color getNormalColor(java.awt.Component c)
c
- the component for which the border is painted
null
protected java.awt.Color getNormalColor(java.awt.Component c, boolean inner, boolean shadow)
c
- the component for which the border is paintedinner
- whether the inner or the outer rectangle is paintedshadow
- whether the shadow or the highlight part is painted
null
protected java.awt.Color defaultModify(java.awt.Color color, boolean inner, boolean shadow)
color
- the basic colorinner
- whether the inner or the outer rectangle is paintedshadow
- whether the shadow or the highlight part is painted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |