OceanTheme (Java SE 26 & JDK 26)
Description: declaration: module: java.desktop, package: javax.swing.plaf.metal, class: OceanTheme
Keywords: javax.swing.plaf.metal.OceanTheme class

# Class OceanTheme

java.lang.Object
javax.swing.plaf.metal.MetalTheme
javax.swing.plaf.metal.DefaultMetalTheme
javax.swing.plaf.metal.OceanTheme

public class OceanTheme extends DefaultMetalTheme
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(MetalTheme)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OceanTheme()`
  Creates an instance of `OceanTheme`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCustomEntriesToTable(UIDefaults table)`
  Add this theme's custom entries to the defaults table.
  `protected ColorUIResource`
  `getBlack()`
  Returns the black color.
  `ColorUIResource`
  `getControlTextColor()`
  Returns the control text color.
  `ColorUIResource`
  `getDesktopColor()`
  Returns the desktop color.
  `ColorUIResource`
  `getInactiveControlTextColor()`
  Returns the inactive control text color.
  `ColorUIResource`
  `getMenuDisabledForeground()`
  Returns the menu disabled foreground color.
  `String`
  `getName()`
  Return the name of this theme, "Ocean".
  `protected ColorUIResource`
  `getPrimary1()`
  Returns the primary 1 color.
  `protected ColorUIResource`
  `getPrimary2()`
  Returns the primary 2 color.
  `protected ColorUIResource`
  `getPrimary3()`
  Returns the primary 3 color.
  `protected ColorUIResource`
  `getSecondary1()`
  Returns the secondary 1 color.
  `protected ColorUIResource`
  `getSecondary2()`
  Returns the secondary 2 color.
  `protected ColorUIResource`
  `getSecondary3()`
  Returns the secondary 3 color.

  ### Methods declared in class DefaultMetalTheme

  `getControlTextFont, getMenuTextFont, getSubTextFont, getSystemTextFont, getUserTextFont, getWindowTitleFont`
  Modifier and Type
  Method
  Description
  `FontUIResource`
  `getControlTextFont()`
  Returns the control text font.
  `FontUIResource`
  `getMenuTextFont()`
  Returns the menu text font.
  `FontUIResource`
  `getSubTextFont()`
  Returns the sub-text font.
  `FontUIResource`
  `getSystemTextFont()`
  Returns the system text font.
  `FontUIResource`
  `getUserTextFont()`
  Returns the user text font.
  `FontUIResource`
  `getWindowTitleFont()`
  Returns the window title font.

  ### Methods declared in class MetalTheme

  `getAcceleratorForeground, getAcceleratorSelectedForeground, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getFocusColor, getHighlightedTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground`
  Modifier and Type
  Method
  Description
  `ColorUIResource`
  `getAcceleratorForeground()`
  Returns the accelerator foreground color.
  `ColorUIResource`
  `getAcceleratorSelectedForeground()`
  Returns the accelerator selected foreground color.
  `ColorUIResource`
  `getControl()`
  Returns the control color.
  `ColorUIResource`
  `getControlDarkShadow()`
  Returns the control dark shadow color.
  `ColorUIResource`
  `getControlDisabled()`
  Returns the control disabled color.
  `ColorUIResource`
  `getControlHighlight()`
  Returns the control highlight color.
  `ColorUIResource`
  `getControlInfo()`
  Returns the control info color.
  `ColorUIResource`
  `getControlShadow()`
  Returns the control shadow color.
  `ColorUIResource`
  `getFocusColor()`
  Returns the focus color.
  `ColorUIResource`
  `getHighlightedTextColor()`
  Returns the highlighted text color.
  `ColorUIResource`
  `getInactiveSystemTextColor()`
  Returns the inactive system text color.
  `ColorUIResource`
  `getMenuBackground()`
  Returns the menu background color.
  `ColorUIResource`
  `getMenuForeground()`
  Returns the menu foreground color.
  `ColorUIResource`
  `getMenuSelectedBackground()`
  Returns the menu selected background color.
  `ColorUIResource`
  `getMenuSelectedForeground()`
  Returns the menu selected foreground color.
  `ColorUIResource`
  `getPrimaryControl()`
  Returns the primary control color.
  `ColorUIResource`
  `getPrimaryControlDarkShadow()`
  Returns the primary control dark shadow color.
  `ColorUIResource`
  `getPrimaryControlHighlight()`
  Returns the primary control highlight color.
  `ColorUIResource`
  `getPrimaryControlInfo()`
  Returns the primary control info color.
  `ColorUIResource`
  `getPrimaryControlShadow()`
  Returns the primary control shadow color.
  `ColorUIResource`
  `getSeparatorBackground()`
  Returns the separator background color.
  `ColorUIResource`
  `getSeparatorForeground()`
  Returns the separator foreground color.
  `ColorUIResource`
  `getSystemTextColor()`
  Returns the system text color.
  `ColorUIResource`
  `getTextHighlightColor()`
  Returns the text highlight color.
  `ColorUIResource`
  `getUserTextColor()`
  Returns the user text color.
  `protected ColorUIResource`
  `getWhite()`
  Returns the white color.
  `ColorUIResource`
  `getWindowBackground()`
  Returns the window background color.
  `ColorUIResource`
  `getWindowTitleBackground()`
  Returns the window title background color.
  `ColorUIResource`
  `getWindowTitleForeground()`
  Returns the window title foreground color.
  `ColorUIResource`
  `getWindowTitleInactiveBackground()`
  Returns the window title inactive background color.
  `ColorUIResource`
  `getWindowTitleInactiveForeground()`
  Returns the window title inactive foreground color.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  Creates and returns a copy of this object.
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `protected void`
  `finalize()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Finalization is deprecated and subject to removal in a future release.
  `final Class<?>`
  `getClass()`
  Returns the runtime class of this `Object`.
  `int`
  `hashCode()`
  Returns a hash code value for this object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
  `final void`
  `wait(long timeoutMillis)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
  `final void`
  `wait(long timeoutMillis, int nanos)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

- ## Constructor Details

  - ### OceanTheme

    public OceanTheme()
    Creates an instance of `OceanTheme`

- ## Method Details

  - ### addCustomEntriesToTable

    public void addCustomEntriesToTable(UIDefaults table)
    Add this theme's custom entries to the defaults table.
    Overrides:
      `addCustomEntriesToTable` in class `MetalTheme`
    Parameters:
      `table` - the defaults table, non-null
    Throws:
      `NullPointerException` - if `table` is `null`
    See Also:
      - `MetalLookAndFeel.getDefaults()`

  - ### getName

    public String getName()
    Return the name of this theme, "Ocean".
    Overrides:
      `getName` in class `DefaultMetalTheme`
    Returns:
      "Ocean"

  - ### getPrimary1

    protected ColorUIResource getPrimary1()
    Returns the primary 1 color. This returns a color with an rgb hex value of `0x6382BF`.
    Overrides:
      `getPrimary1` in class `DefaultMetalTheme`
    Returns:
      the primary 1 color
    See Also:
      - `Color.decode(String)`

  - ### getPrimary2

    protected ColorUIResource getPrimary2()
    Returns the primary 2 color. This returns a color with an rgb hex value of `0xA3B8CC`.
    Overrides:
      `getPrimary2` in class `DefaultMetalTheme`
    Returns:
      the primary 2 color
    See Also:
      - `Color.decode(String)`

  - ### getPrimary3

    protected ColorUIResource getPrimary3()
    Returns the primary 3 color. This returns a color with an rgb hex value of `0xB8CFE5`.
    Overrides:
      `getPrimary3` in class `DefaultMetalTheme`
    Returns:
      the primary 3 color
    See Also:
      - `Color.decode(String)`

  - ### getSecondary1

    protected ColorUIResource getSecondary1()
    Returns the secondary 1 color. This returns a color with an rgb hex value of `0x7A8A99`.
    Overrides:
      `getSecondary1` in class `DefaultMetalTheme`
    Returns:
      the secondary 1 color
    See Also:
      - `Color.decode(String)`

  - ### getSecondary2

    protected ColorUIResource getSecondary2()
    Returns the secondary 2 color. This returns a color with an rgb hex value of `0xB8CFE5`.
    Overrides:
      `getSecondary2` in class `DefaultMetalTheme`
    Returns:
      the secondary 2 color
    See Also:
      - `Color.decode(String)`

  - ### getSecondary3

    protected ColorUIResource getSecondary3()
    Returns the secondary 3 color. This returns a color with an rgb hex value of `0xEEEEEE`.
    Overrides:
      `getSecondary3` in class `DefaultMetalTheme`
    Returns:
      the secondary 3 color
    See Also:
      - `Color.decode(String)`

  - ### getBlack

    protected ColorUIResource getBlack()
    Returns the black color. This returns a color with an rgb hex value of `0x333333`.
    Overrides:
      `getBlack` in class `MetalTheme`
    Returns:
      the black color
    See Also:
      - `Color.decode(String)`

  - ### getDesktopColor

    public ColorUIResource getDesktopColor()
    Returns the desktop color. This returns a color with an rgb hex value of `0xFFFFFF`.
    Overrides:
      `getDesktopColor` in class `MetalTheme`
    Returns:
      the desktop color
    See Also:
      - `Color.decode(String)`

  - ### getInactiveControlTextColor

    public ColorUIResource getInactiveControlTextColor()
    Returns the inactive control text color. This returns a color with an rgb hex value of `0x999999`.
    Overrides:
      `getInactiveControlTextColor` in class `MetalTheme`
    Returns:
      the inactive control text color

  - ### getControlTextColor

    public ColorUIResource getControlTextColor()
    Returns the control text color. This returns a color with an rgb hex value of `0x333333`.
    Overrides:
      `getControlTextColor` in class `MetalTheme`
    Returns:
      the control text color

  - ### getMenuDisabledForeground

    public ColorUIResource getMenuDisabledForeground()
    Returns the menu disabled foreground color. This returns a color with an rgb hex value of `0x999999`.
    Overrides:
      `getMenuDisabledForeground` in class `MetalTheme`
    Returns:
      the menu disabled foreground color