Package gov.nasa.worldwind.util.tree
Class BasicFrameAttributes
- java.lang.Object
-
- gov.nasa.worldwind.util.tree.BasicFrameAttributes
-
- All Implemented Interfaces:
FrameAttributes
public class BasicFrameAttributes extends java.lang.Object implements FrameAttributes
Basic implementation ofFrameAttributesset.
-
-
Field Summary
Fields Modifier and Type Field Description protected doublebackgroundOpacityprotected intcornerRadiusprotected java.awt.Fontfontprotected java.awt.ColorforegroundColorprotected doubleforegroundOpacityprotected java.awt.ColorframeColor1protected java.awt.ColorframeColor2protected java.awt.DimensioniconSizeprotected inticonSpaceprotected java.awt.ColorminimizeButtonColorprotected java.awt.ColorscrollBarColor1protected java.awt.ColorscrollBarColor2protected java.awt.ColortextColorprotected java.awt.ColortitleBarColor1protected java.awt.ColortitleBarColor2
-
Constructor Summary
Constructors Constructor Description BasicFrameAttributes()BasicFrameAttributes(BasicFrameAttributes attributes)Create a new attributes object with the same configuration as an existing attributes object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicFrameAttributescopy()Returns a new FrameAttributes instance of the same type as this FrameAttributes, who's properties are configured exactly as this FrameAttributes.voidcopy(FrameAttributes attributes)Copies the specified FrameAttributes' properties into this object's properties.booleanequals(java.lang.Object o)java.awt.Color[]getBackgroundColor()Get the colors that make up the frame's background gradient.doublegetBackgroundOpacity()Get the opacity of the frame.intgetCornerRadius()Get the radius of the frame corners.java.awt.FontgetFont()Get the font used to render text.java.awt.ColorgetForegroundColor()Get the color of the text in the frame.doublegetForegroundOpacity()Get the opacity of the text and images in the frame.java.awt.DimensiongetIconSize()Get the size of the icon in the frame title bar.intgetIconSpace()Get the amount of space, in pixels, to leave between an icon in the frame and surrounding text and shapes.java.awt.ColorgetMinimizeButtonColor()Get the color of the minimize button drawn in the upper right corner of the frame.java.awt.Color[]getScrollBarColor()Get the colors used to draw the frame's scroll bars.java.awt.ColorgetTextColor()Get the color of the text in the frame title bar.java.awt.Color[]getTitleBarColor()Get the colors that make up the frame's title bar gradient.inthashCode()voidsetBackgroundColor(java.awt.Color frameColor1, java.awt.Color frameColor2)Set the colors in the background gradient of the frame.voidsetBackgroundOpacity(double frameOpacity)Set the opacity of the frame.voidsetCornerRadius(int cornerRadius)Set the radius of the frame corners.voidsetFont(java.awt.Font font)Set the font used to render text.voidsetForegroundColor(java.awt.Color textColor)Set the color of the text in the frame.voidsetForegroundOpacity(double textOpacity)Set the opacity of the frame text and images.voidsetIconSize(java.awt.Dimension iconSize)Set the size of each icon in the frame title bar.voidsetIconSpace(int iconSpace)Set the amount of space, in pixels, to leave between an icon in the frame and surrounding text and shapes.voidsetMinimizeButtonColor(java.awt.Color minimizeButtonColor)Set the color of the minimize button drawn in the upper right corner of the frame.voidsetScrollBarColor(java.awt.Color color1, java.awt.Color color2)Set the colors in the scroll bar gradient.voidsetTextColor(java.awt.Color textColor)Set the color of the text in the frame title bar.voidsetTitleBarColor(java.awt.Color color1, java.awt.Color color2)Set the colors in the title bar gradient.
-
-
-
Field Detail
-
backgroundOpacity
protected double backgroundOpacity
-
frameColor1
protected java.awt.Color frameColor1
-
frameColor2
protected java.awt.Color frameColor2
-
titleBarColor1
protected java.awt.Color titleBarColor1
-
titleBarColor2
protected java.awt.Color titleBarColor2
-
scrollBarColor1
protected java.awt.Color scrollBarColor1
-
scrollBarColor2
protected java.awt.Color scrollBarColor2
-
minimizeButtonColor
protected java.awt.Color minimizeButtonColor
-
foregroundOpacity
protected double foregroundOpacity
-
foregroundColor
protected java.awt.Color foregroundColor
-
textColor
protected java.awt.Color textColor
-
font
protected java.awt.Font font
-
iconSize
protected java.awt.Dimension iconSize
-
iconSpace
protected int iconSpace
-
cornerRadius
protected int cornerRadius
-
-
Constructor Detail
-
BasicFrameAttributes
public BasicFrameAttributes()
-
BasicFrameAttributes
public BasicFrameAttributes(BasicFrameAttributes attributes)
Create a new attributes object with the same configuration as an existing attributes object.- Parameters:
attributes- Object to copy configuration from.
-
-
Method Detail
-
getForegroundColor
public java.awt.Color getForegroundColor()
Get the color of the text in the frame.- Specified by:
getForegroundColorin interfaceFrameAttributes- Returns:
- The foreground color.
- See Also:
FrameAttributes.setForegroundColor(java.awt.Color)
-
setForegroundColor
public void setForegroundColor(java.awt.Color textColor)
Set the color of the text in the frame.- Specified by:
setForegroundColorin interfaceFrameAttributes- Parameters:
textColor- New foreground color.- See Also:
FrameAttributes.getForegroundColor()
-
getFont
public java.awt.Font getFont()
Get the font used to render text.- Specified by:
getFontin interfaceFrameAttributes- Returns:
- frame font.
- See Also:
FrameAttributes.setFont(java.awt.Font)
-
setFont
public void setFont(java.awt.Font font)
Set the font used to render text.- Specified by:
setFontin interfaceFrameAttributes- Parameters:
font- New frame font.- See Also:
FrameAttributes.getFont()
-
getTextColor
public java.awt.Color getTextColor()
Get the color of the text in the frame title bar.- Specified by:
getTextColorin interfaceFrameAttributes- Returns:
- The color of text in the tree frame.
-
setTextColor
public void setTextColor(java.awt.Color textColor)
Set the color of the text in the frame title bar.- Specified by:
setTextColorin interfaceFrameAttributes- Parameters:
textColor- The new color of text in the tree frame.
-
getIconSize
public java.awt.Dimension getIconSize()
Get the size of the icon in the frame title bar.- Specified by:
getIconSizein interfaceFrameAttributes- Returns:
- Icon size.
- See Also:
FrameAttributes.setIconSize(java.awt.Dimension)
-
setIconSize
public void setIconSize(java.awt.Dimension iconSize)
Set the size of each icon in the frame title bar.- Specified by:
setIconSizein interfaceFrameAttributes- Parameters:
iconSize- New size.- See Also:
FrameAttributes.getIconSize()
-
getIconSpace
public int getIconSpace()
Get the amount of space, in pixels, to leave between an icon in the frame and surrounding text and shapes.- Specified by:
getIconSpacein interfaceFrameAttributes- Returns:
- Icon space in pixels.
- See Also:
FrameAttributes.setIconSpace(int)
-
setIconSpace
public void setIconSpace(int iconSpace)
Set the amount of space, in pixels, to leave between an icon in the frame and surrounding text and shapes.- Specified by:
setIconSpacein interfaceFrameAttributes- Parameters:
iconSpace- Icon space in pixels.- See Also:
FrameAttributes.getIconSpace()
-
getForegroundOpacity
public double getForegroundOpacity()
Get the opacity of the text and images in the frame.- Specified by:
getForegroundOpacityin interfaceFrameAttributes- Returns:
- Opacity of text and images.
- See Also:
FrameAttributes.setForegroundOpacity(double),FrameAttributes.getBackgroundOpacity()
-
setForegroundOpacity
public void setForegroundOpacity(double textOpacity)
Set the opacity of the frame text and images.- Specified by:
setForegroundOpacityin interfaceFrameAttributes- Parameters:
textOpacity- New opacity.- See Also:
FrameAttributes.getForegroundOpacity(),FrameAttributes.setBackgroundOpacity(double)
-
getBackgroundOpacity
public double getBackgroundOpacity()
Get the opacity of the frame.- Specified by:
getBackgroundOpacityin interfaceFrameAttributes- Returns:
- Frame opacity.
- See Also:
FrameAttributes.setBackgroundOpacity(double)
-
setBackgroundOpacity
public void setBackgroundOpacity(double frameOpacity)
Set the opacity of the frame.- Specified by:
setBackgroundOpacityin interfaceFrameAttributes- Parameters:
frameOpacity- New frame opacity.- See Also:
FrameAttributes.getBackgroundOpacity()
-
getBackgroundColor
public java.awt.Color[] getBackgroundColor()
Get the colors that make up the frame's background gradient.- Specified by:
getBackgroundColorin interfaceFrameAttributes- Returns:
- Two element array containing the colors in the background gradient.
- See Also:
FrameAttributes.setBackgroundColor(java.awt.Color, java.awt.Color)
-
setTitleBarColor
public void setTitleBarColor(java.awt.Color color1, java.awt.Color color2)Set the colors in the title bar gradient.- Specified by:
setTitleBarColorin interfaceFrameAttributes- Parameters:
color1- First color in the title bar gradient.color2- Second color in the title bar gradient.- See Also:
FrameAttributes.getTitleBarColor()
-
getTitleBarColor
public java.awt.Color[] getTitleBarColor()
Get the colors that make up the frame's title bar gradient.- Specified by:
getTitleBarColorin interfaceFrameAttributes- Returns:
- Two element array containing the colors in the title bar gradient.
- See Also:
FrameAttributes.setTitleBarColor(java.awt.Color, java.awt.Color)
-
getScrollBarColor
public java.awt.Color[] getScrollBarColor()
Get the colors used to draw the frame's scroll bars.- Specified by:
getScrollBarColorin interfaceFrameAttributes- Returns:
- Two element array containing the colors in the scroll bar gradient.
- See Also:
FrameAttributes.setScrollBarColor(java.awt.Color, java.awt.Color)
-
setScrollBarColor
public void setScrollBarColor(java.awt.Color color1, java.awt.Color color2)Set the colors in the scroll bar gradient.- Specified by:
setScrollBarColorin interfaceFrameAttributes- Parameters:
color1- First color in the scroll bar gradient.color2- Second color in the scroll bar gradient.- See Also:
FrameAttributes.getScrollBarColor()
-
getMinimizeButtonColor
public java.awt.Color getMinimizeButtonColor()
Get the color of the minimize button drawn in the upper right corner of the frame.- Specified by:
getMinimizeButtonColorin interfaceFrameAttributes- Returns:
- Color of the minimize button.
-
setMinimizeButtonColor
public void setMinimizeButtonColor(java.awt.Color minimizeButtonColor)
Set the color of the minimize button drawn in the upper right corner of the frame.- Specified by:
setMinimizeButtonColorin interfaceFrameAttributes- Parameters:
minimizeButtonColor- Color of the minimize button.
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color frameColor1, java.awt.Color frameColor2)Set the colors in the background gradient of the frame.- Specified by:
setBackgroundColorin interfaceFrameAttributes- Parameters:
frameColor1- First color in frame gradient.frameColor2- Second color in frame gradient.- See Also:
FrameAttributes.getBackgroundColor()
-
getCornerRadius
public int getCornerRadius()
Get the radius of the frame corners. A value ofzeromeans square corners.- Specified by:
getCornerRadiusin interfaceFrameAttributes- Returns:
- The radius of the frame corners, in pixels.
-
setCornerRadius
public void setCornerRadius(int cornerRadius)
Set the radius of the frame corners.- Specified by:
setCornerRadiusin interfaceFrameAttributes- Parameters:
cornerRadius- New radius, in pixels. A value ofzeromeans square corners.
-
copy
public BasicFrameAttributes copy()
Returns a new FrameAttributes instance of the same type as this FrameAttributes, who's properties are configured exactly as this FrameAttributes.- Specified by:
copyin interfaceFrameAttributes- Returns:
- a copy of this FrameAttributes.
-
copy
public void copy(FrameAttributes attributes)
Copies the specified FrameAttributes' properties into this object's properties. This does nothing if the specified attributes is null.- Specified by:
copyin interfaceFrameAttributes- Parameters:
attributes- the attributes to copy.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-