Search in sources :

Example 11 with MenuBar

use of org.apache.pivot.wtk.MenuBar in project pivot by apache.

the class TerraMenuBarItemSkin method isOpaque.

@Override
public boolean isOpaque() {
    boolean opaque = false;
    MenuBar.Item menuBarItem = (MenuBar.Item) getComponent();
    if (menuBarItem.isActive()) {
        MenuBar menuBar = (MenuBar) menuBarItem.getParent();
        Color activeBackgroundColor = menuBar.getStyles().getColor(Style.activeBackgroundColor);
        opaque = (activeBackgroundColor.getTransparency() == Transparency.OPAQUE);
    }
    return opaque;
}
Also used : Color(java.awt.Color) MenuBar(org.apache.pivot.wtk.MenuBar)

Aggregations

MenuBar (org.apache.pivot.wtk.MenuBar)11 Frame (org.apache.pivot.wtk.Frame)6 Component (org.apache.pivot.wtk.Component)5 GradientPaint (java.awt.GradientPaint)4 Point (org.apache.pivot.wtk.Point)4 Color (java.awt.Color)3 Dimensions (org.apache.pivot.wtk.Dimensions)2 Font (java.awt.Font)1 BXMLSerializer (org.apache.pivot.beans.BXMLSerializer)1 Action (org.apache.pivot.wtk.Action)1 BoxPane (org.apache.pivot.wtk.BoxPane)1 Button (org.apache.pivot.wtk.Button)1 MenuHandler (org.apache.pivot.wtk.MenuHandler)1 TextInput (org.apache.pivot.wtk.TextInput)1 Image (org.apache.pivot.wtk.media.Image)1