Top Description Inners Fields Constructors Methods
javax.swing.plaf.metal

public Class OceanTheme

extends DefaultMetalTheme
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.awt.*, java.net.URL, java.util.*, javax.swing.*, javax.swing.plaf.*, sun.swing.SwingUtilities2, .PrintColorUIResource

The default theme for the MetalLookAndFeel.

The designers of the Metal Look and Feel strive to keep the default look up to date, possibly through the use of new themes in the future. Therefore, developers should only use this class directly when they wish to customize the "Ocean" look, or force it to be the current theme, regardless of future updates.

All colors returned by OceanTheme are completely opaque.

Since
1.5
See Also
MetalLookAndFeel#setCurrentTheme

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource
private static final ColorUIResource

Constructor Summary

AccessConstructor and Description
public
OceanTheme()

Creates an instance of OceanTheme

Method Summary

Modifier and TypeMethod and Description
public void
addCustomEntriesToTable(UIDefaults
the defaults table, non-null
table
)

Overrides javax.swing.plaf.metal.MetalTheme.addCustomEntriesToTable.

Add this theme's custom entries to the defaults table.

protected ColorUIResource

Returns:

the black color
getBlack
()

Overrides javax.swing.plaf.metal.MetalTheme.getBlack.

Returns the black color.

public ColorUIResource

Returns:

the control text color
getControlTextColor
()

Overrides javax.swing.plaf.metal.MetalTheme.getControlTextColor.

Returns the control text color.

public ColorUIResource

Returns:

the desktop color
getDesktopColor
()

Overrides javax.swing.plaf.metal.MetalTheme.getDesktopColor.

Returns the desktop color.

private Icon
private Object
public ColorUIResource

Returns:

the inactive control text color
getInactiveControlTextColor
()

Overrides javax.swing.plaf.metal.MetalTheme.getInactiveControlTextColor.

Returns the inactive control text color.

public ColorUIResource

Returns:

the menu disabled foreground color
getMenuDisabledForeground
()

Overrides javax.swing.plaf.metal.MetalTheme.getMenuDisabledForeground.

Returns the menu disabled foreground color.

public String

Returns:

"Ocean"
getName
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getName.

Return the name of this theme, "Ocean".

protected ColorUIResource

Returns:

the primary 1 color
getPrimary1
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getPrimary1.

Returns the primary 1 color.

protected ColorUIResource

Returns:

the primary 2 color
getPrimary2
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getPrimary2.

Returns the primary 2 color.

protected ColorUIResource

Returns:

the primary 3 color
getPrimary3
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getPrimary3.

Returns the primary 3 color.

protected ColorUIResource

Returns:

the secondary 1 color
getSecondary1
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getSecondary1.

Returns the secondary 1 color.

protected ColorUIResource

Returns:

the secondary 2 color
getSecondary2
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getSecondary2.

Returns the secondary 2 color.

protected ColorUIResource

Returns:

the secondary 3 color
getSecondary3
()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getSecondary3.

Returns the secondary 3 color.

pack-priv boolean
isSystemTheme()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.isSystemTheme.

Overridden to enable picking up the system fonts, if applicable.

Inherited from javax.swing.plaf.metal.DefaultMetalTheme:
getControlTextFontgetDefaultFontNamegetDefaultFontSizegetDefaultFontStylegetDefaultPropertyNamegetMenuTextFontgetSubTextFontgetSystemTextFontgetUserTextFontgetWindowTitleFontinstall

Field Detail

CONTROL_TEXT_COLORback to summary
private static final ColorUIResource CONTROL_TEXT_COLOR
INACTIVE_CONTROL_TEXT_COLORback to summary
private static final ColorUIResource INACTIVE_CONTROL_TEXT_COLOR
OCEAN_BLACKback to summary
private static final ColorUIResource OCEAN_BLACK
OCEAN_DROPback to summary
private static final ColorUIResource OCEAN_DROP
PRIMARY1back to summary
private static final ColorUIResource PRIMARY1
PRIMARY2back to summary
private static final ColorUIResource PRIMARY2
PRIMARY3back to summary
private static final ColorUIResource PRIMARY3
SECONDARY1back to summary
private static final ColorUIResource SECONDARY1
SECONDARY2back to summary
private static final ColorUIResource SECONDARY2
SECONDARY3back to summary
private static final ColorUIResource SECONDARY3

Constructor Detail

OceanThemeback to summary
public OceanTheme()

Creates an instance of OceanTheme

Method Detail

addCustomEntriesToTableback to summary
public void addCustomEntriesToTable(UIDefaults table)

Overrides javax.swing.plaf.metal.MetalTheme.addCustomEntriesToTable.

Add this theme's custom entries to the defaults table.

Parameters
table:UIDefaults

the defaults table, non-null

Exceptions
NullPointerException:
if table is null
getBlackback to summary
protected ColorUIResource getBlack()

Overrides javax.swing.plaf.metal.MetalTheme.getBlack.

Returns the black color. This returns a color with an rgb hex value of 0x333333.

Returns:ColorUIResource

the black color

See Also
java.awt.Color#decode
getControlTextColorback to summary
public ColorUIResource getControlTextColor()

Overrides javax.swing.plaf.metal.MetalTheme.getControlTextColor.

Returns the control text color. This returns a color with an rgb hex value of 0x333333.

Returns:ColorUIResource

the control text color

getDesktopColorback to summary
public ColorUIResource getDesktopColor()

Overrides javax.swing.plaf.metal.MetalTheme.getDesktopColor.

Returns the desktop color. This returns a color with an rgb hex value of 0xFFFFFF.

Returns:ColorUIResource

the desktop color

See Also
java.awt.Color#decode
getHastenedIconback to summary
private Icon getHastenedIcon(String iconID, UIDefaults table)
getIconResourceback to summary
private Object getIconResource(String iconID)
getInactiveControlTextColorback to summary
public ColorUIResource getInactiveControlTextColor()

Overrides javax.swing.plaf.metal.MetalTheme.getInactiveControlTextColor.

Returns the inactive control text color. This returns a color with an rgb hex value of 0x999999.

Returns:ColorUIResource

the inactive control text color

getMenuDisabledForegroundback to summary
public ColorUIResource getMenuDisabledForeground()

Overrides javax.swing.plaf.metal.MetalTheme.getMenuDisabledForeground.

Returns the menu disabled foreground color. This returns a color with an rgb hex value of 0x999999.

Returns:ColorUIResource

the menu disabled foreground color

getNameback to summary
public String getName()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getName.

Return the name of this theme, "Ocean".

Returns:String

"Ocean"

getPrimary1back to summary
protected ColorUIResource getPrimary1()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getPrimary1.

Returns the primary 1 color. This returns a color with an rgb hex value of 0x6382BF.

Returns:ColorUIResource

the primary 1 color

See Also
java.awt.Color#decode
getPrimary2back to summary
protected ColorUIResource getPrimary2()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getPrimary2.

Returns the primary 2 color. This returns a color with an rgb hex value of 0xA3B8CC.

Returns:ColorUIResource

the primary 2 color

See Also
java.awt.Color#decode
getPrimary3back to summary
protected ColorUIResource getPrimary3()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getPrimary3.

Returns the primary 3 color. This returns a color with an rgb hex value of 0xB8CFE5.

Returns:ColorUIResource

the primary 3 color

See Also
java.awt.Color#decode
getSecondary1back to summary
protected ColorUIResource getSecondary1()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getSecondary1.

Returns the secondary 1 color. This returns a color with an rgb hex value of 0x7A8A99.

Returns:ColorUIResource

the secondary 1 color

See Also
java.awt.Color#decode
getSecondary2back to summary
protected ColorUIResource getSecondary2()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getSecondary2.

Returns the secondary 2 color. This returns a color with an rgb hex value of 0xB8CFE5.

Returns:ColorUIResource

the secondary 2 color

See Also
java.awt.Color#decode
getSecondary3back to summary
protected ColorUIResource getSecondary3()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.getSecondary3.

Returns the secondary 3 color. This returns a color with an rgb hex value of 0xEEEEEE.

Returns:ColorUIResource

the secondary 3 color

See Also
java.awt.Color#decode
isSystemThemeback to summary
pack-priv boolean isSystemTheme()

Overrides javax.swing.plaf.metal.DefaultMetalTheme.isSystemTheme.

Overridden to enable picking up the system fonts, if applicable.

javax.swing.plaf.metal back to summary

private Class OceanTheme.COIcon

extends IconUIResource
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Icon

Constructor Summary

AccessConstructor and Description
public
COIcon(Icon ltr, Icon rtl)

Method Summary

Modifier and TypeMethod and Description
public void
paintIcon(Component
a Component to get properties useful for painting
c
,
Graphics
the graphics context
g
,
int
the X coordinate of the icon's top-left corner
x
,
int
the Y coordinate of the icon's top-left corner
y
)

Overrides javax.swing.plaf.IconUIResource.paintIcon.

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from javax.swing.plaf.IconUIResource:
getIconHeightgetIconWidth

Field Detail

rtlback to summary
private Icon rtl

Constructor Detail

COIconback to summary
public COIcon(Icon ltr, Icon rtl)

Method Detail

paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Overrides javax.swing.plaf.IconUIResource.paintIcon.

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Parameters
c:Component

a Component to get properties useful for painting

g:Graphics

the graphics context

x:int

the X coordinate of the icon's top-left corner

y:int

the Y coordinate of the icon's top-left corner

javax.swing.plaf.metal back to summary

private Class OceanTheme.IFIcon

extends IconUIResource
Class Inheritance
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
private Icon

Constructor Summary

AccessConstructor and Description
public
IFIcon(Icon normal, Icon pressed)

Method Summary

Modifier and TypeMethod and Description
public void
paintIcon(Component
a Component to get properties useful for painting
c
,
Graphics
the graphics context
g
,
int
the X coordinate of the icon's top-left corner
x
,
int
the Y coordinate of the icon's top-left corner
y
)

Overrides javax.swing.plaf.IconUIResource.paintIcon.

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from javax.swing.plaf.IconUIResource:
getIconHeightgetIconWidth

Field Detail

pressedback to summary
private Icon pressed

Constructor Detail

IFIconback to summary
public IFIcon(Icon normal, Icon pressed)

Method Detail

paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Overrides javax.swing.plaf.IconUIResource.paintIcon.

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Parameters
c:Component

a Component to get properties useful for painting

g:Graphics

the graphics context

x:int

the X coordinate of the icon's top-left corner

y:int

the Y coordinate of the icon's top-left corner