NASA World Wind

gov.nasa.worldwind.util.tree
Class BasicFrameAttributes

java.lang.Object
  extended by gov.nasa.worldwind.util.tree.BasicFrameAttributes
All Implemented Interfaces:
FrameAttributes

public class BasicFrameAttributes
extends Object
implements FrameAttributes

Basic implementation of FrameAttributes set.


Field Summary
protected  double backgroundOpacity
           
protected  int cornerRadius
           
protected  Font font
           
protected  Color foregroundColor
           
protected  double foregroundOpacity
           
protected  Color frameColor1
           
protected  Color frameColor2
           
protected  Dimension iconSize
           
protected  int iconSpace
           
protected  Color minimizeButtonColor
           
protected  Color scrollBarColor1
           
protected  Color scrollBarColor2
           
protected  Color textColor
           
protected  Color titleBarColor1
           
protected  Color titleBarColor2
           
 
Constructor Summary
BasicFrameAttributes()
           
BasicFrameAttributes(BasicFrameAttributes attributes)
          Create a new attributes object with the same configuration as an existing attributes object.
 
Method Summary
 BasicFrameAttributes copy()
          Returns a new FrameAttributes instance of the same type as this FrameAttributes, who's properties are configured exactly as this FrameAttributes.
 void copy(FrameAttributes attributes)
          Copies the specified FrameAttributes' properties into this object's properties.
 boolean equals(Object o)
           
 Color[] getBackgroundColor()
          Get the colors that make up the frame's background gradient.
 double getBackgroundOpacity()
          Get the opacity of the frame.
 int getCornerRadius()
          Get the radius of the frame corners.
 Font getFont()
          Get the font used to render text.
 Color getForegroundColor()
          Get the color of the text in the frame.
 double getForegroundOpacity()
          Get the opacity of the text and images in the frame.
 Dimension getIconSize()
          Get the size of the icon in the frame title bar.
 int getIconSpace()
          Get the amount of space, in pixels, to leave between an icon in the frame and surrounding text and shapes.
 Color getMinimizeButtonColor()
          Get the color of the minimize button drawn in the upper right corner of the frame.
 Color[] getScrollBarColor()
          Get the colors used to draw the frame's scroll bars.
 Color getTextColor()
          Get the color of the text in the frame title bar.
 Color[] getTitleBarColor()
          Get the colors that make up the frame's title bar gradient.
 int hashCode()
           
 void setBackgroundColor(Color frameColor1, Color frameColor2)
          Set the colors in the background gradient of the frame.
 void setBackgroundOpacity(double frameOpacity)
          Set the opacity of the frame.
 void setCornerRadius(int cornerRadius)
          Set the radius of the frame corners.
 void setFont(Font font)
          Set the font used to render text.
 void setForegroundColor(Color textColor)
          Set the color of the text in the frame.
 void setForegroundOpacity(double textOpacity)
          Set the opacity of the frame text and images.
 void setIconSize(Dimension iconSize)
          Set the size of each icon in the frame title bar.
 void setIconSpace(int iconSpace)
          Set the amount of space, in pixels, to leave between an icon in the frame and surrounding text and shapes.
 void setMinimizeButtonColor(Color minimizeButtonColor)
          Set the color of the minimize button drawn in the upper right corner of the frame.
 void setScrollBarColor(Color color1, Color color2)
          Set the colors in the scroll bar gradient.
 void setTextColor(Color textColor)
          Set the color of the text in the frame title bar.
 void setTitleBarColor(Color color1, Color color2)
          Set the colors in the title bar gradient.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundOpacity

protected double backgroundOpacity

cornerRadius

protected int cornerRadius

font

protected Font font

foregroundColor

protected Color foregroundColor

foregroundOpacity

protected double foregroundOpacity

frameColor1

protected Color frameColor1

frameColor2

protected Color frameColor2

iconSize

protected Dimension iconSize

iconSpace

protected int iconSpace

minimizeButtonColor

protected Color minimizeButtonColor

scrollBarColor1

protected Color scrollBarColor1

scrollBarColor2

protected Color scrollBarColor2

textColor

protected Color textColor

titleBarColor1

protected Color titleBarColor1

titleBarColor2

protected Color titleBarColor2
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

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:
copy in interface FrameAttributes
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:
copy in interface FrameAttributes
Parameters:
attributes - the attributes to copy.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getBackgroundColor

public Color[] getBackgroundColor()
Get the colors that make up the frame's background gradient.

Specified by:
getBackgroundColor in interface FrameAttributes
Returns:
Two element array containing the colors in the background gradient.
See Also:
FrameAttributes.setBackgroundColor(java.awt.Color, java.awt.Color)

getBackgroundOpacity

public double getBackgroundOpacity()
Get the opacity of the frame.

Specified by:
getBackgroundOpacity in interface FrameAttributes
Returns:
Frame opacity.
See Also:
FrameAttributes.setBackgroundOpacity(double)

getCornerRadius

public int getCornerRadius()
Get the radius of the frame corners. A value of zero means square corners.

Specified by:
getCornerRadius in interface FrameAttributes
Returns:
The radius of the frame corners, in pixels.

getFont

public Font getFont()
Get the font used to render text.

Specified by:
getFont in interface FrameAttributes
Returns:
frame font.
See Also:
FrameAttributes.setFont(java.awt.Font)

getForegroundColor

public Color getForegroundColor()
Get the color of the text in the frame.

Specified by:
getForegroundColor in interface FrameAttributes
Returns:
The foreground color.
See Also:
FrameAttributes.setForegroundColor(java.awt.Color)

getForegroundOpacity

public double getForegroundOpacity()
Get the opacity of the text and images in the frame.

Specified by:
getForegroundOpacity in interface FrameAttributes
Returns:
Opacity of text and images.
See Also:
FrameAttributes.setForegroundOpacity(double), FrameAttributes.getBackgroundOpacity()

getIconSize

public Dimension getIconSize()
Get the size of the icon in the frame title bar.

Specified by:
getIconSize in interface FrameAttributes
Returns:
Icon size.
See Also:
FrameAttributes.setIconSize(java.awt.Dimension)

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:
getIconSpace in interface FrameAttributes
Returns:
Icon space in pixels.
See Also:
FrameAttributes.setIconSpace(int)

getMinimizeButtonColor

public Color getMinimizeButtonColor()
Get the color of the minimize button drawn in the upper right corner of the frame.

Specified by:
getMinimizeButtonColor in interface FrameAttributes
Returns:
Color of the minimize button.

getScrollBarColor

public Color[] getScrollBarColor()
Get the colors used to draw the frame's scroll bars.

Specified by:
getScrollBarColor in interface FrameAttributes
Returns:
Two element array containing the colors in the scroll bar gradient.
See Also:
FrameAttributes.setScrollBarColor(java.awt.Color, java.awt.Color)

getTextColor

public Color getTextColor()
Get the color of the text in the frame title bar.

Specified by:
getTextColor in interface FrameAttributes
Returns:
The color of text in the tree frame.

getTitleBarColor

public Color[] getTitleBarColor()
Get the colors that make up the frame's title bar gradient.

Specified by:
getTitleBarColor in interface FrameAttributes
Returns:
Two element array containing the colors in the title bar gradient.
See Also:
FrameAttributes.setTitleBarColor(java.awt.Color, java.awt.Color)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setBackgroundColor

public void setBackgroundColor(Color frameColor1,
                               Color frameColor2)
Set the colors in the background gradient of the frame.

Specified by:
setBackgroundColor in interface FrameAttributes
Parameters:
frameColor1 - First color in frame gradient.
frameColor2 - Second color in frame gradient.
See Also:
FrameAttributes.getBackgroundColor()

setBackgroundOpacity

public void setBackgroundOpacity(double frameOpacity)
Set the opacity of the frame.

Specified by:
setBackgroundOpacity in interface FrameAttributes
Parameters:
frameOpacity - New frame opacity.
See Also:
FrameAttributes.getBackgroundOpacity()

setCornerRadius

public void setCornerRadius(int cornerRadius)
Set the radius of the frame corners.

Specified by:
setCornerRadius in interface FrameAttributes
Parameters:
cornerRadius - New radius, in pixels. A value of zero means square corners.

setFont

public void setFont(Font font)
Set the font used to render text.

Specified by:
setFont in interface FrameAttributes
Parameters:
font - New frame font.
See Also:
FrameAttributes.getFont()

setForegroundColor

public void setForegroundColor(Color textColor)
Set the color of the text in the frame.

Specified by:
setForegroundColor in interface FrameAttributes
Parameters:
textColor - New foreground color.
See Also:
FrameAttributes.getForegroundColor()

setForegroundOpacity

public void setForegroundOpacity(double textOpacity)
Set the opacity of the frame text and images.

Specified by:
setForegroundOpacity in interface FrameAttributes
Parameters:
textOpacity - New opacity.
See Also:
FrameAttributes.getForegroundOpacity(), FrameAttributes.setBackgroundOpacity(double)

setIconSize

public void setIconSize(Dimension iconSize)
Set the size of each icon in the frame title bar.

Specified by:
setIconSize in interface FrameAttributes
Parameters:
iconSize - New size.
See Also:
FrameAttributes.getIconSize()

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:
setIconSpace in interface FrameAttributes
Parameters:
iconSpace - Icon space in pixels.
See Also:
FrameAttributes.getIconSpace()

setMinimizeButtonColor

public void setMinimizeButtonColor(Color minimizeButtonColor)
Set the color of the minimize button drawn in the upper right corner of the frame.

Specified by:
setMinimizeButtonColor in interface FrameAttributes
Parameters:
minimizeButtonColor - Color of the minimize button.

setScrollBarColor

public void setScrollBarColor(Color color1,
                              Color color2)
Set the colors in the scroll bar gradient.

Specified by:
setScrollBarColor in interface FrameAttributes
Parameters:
color1 - First color in the scroll bar gradient.
color2 - Second color in the scroll bar gradient.
See Also:
FrameAttributes.getScrollBarColor()

setTextColor

public void setTextColor(Color textColor)
Set the color of the text in the frame title bar.

Specified by:
setTextColor in interface FrameAttributes
Parameters:
textColor - The new color of text in the tree frame.

setTitleBarColor

public void setTitleBarColor(Color color1,
                             Color color2)
Set the colors in the title bar gradient.

Specified by:
setTitleBarColor in interface FrameAttributes
Parameters:
color1 - First color in the title bar gradient.
color2 - Second color in the title bar gradient.
See Also:
FrameAttributes.getTitleBarColor()

NASA World Wind