Search in sources :

Example 1 with DropShadowDecorator

use of org.apache.pivot.wtk.effects.DropShadowDecorator in project pivot by apache.

the class TerraFrameSkin method install.

@Override
public void install(Component component) {
    super.install(component);
    Frame frame = (Frame) getComponent();
    if (!themeIsFlat()) {
        // Attach the drop-shadow decorator
        dropShadowDecorator = new DropShadowDecorator(5, 5, 5);
        frame.getDecorators().add(dropShadowDecorator);
    }
    frame.add(titleBarTablePane);
    // Create the frame buttons
    minimizeButton = new FrameButton(minimizeImage);
    maximizeButton = new FrameButton(maximizeImage);
    closeButton = new FrameButton(closeImage);
    buttonBoxPane.add(minimizeButton);
    buttonBoxPane.add(maximizeButton);
    buttonBoxPane.add(closeButton);
    ButtonPressListener buttonPressListener = new ButtonPressListener() {

        @Override
        public void buttonPressed(Button button) {
            Frame frameLocal = (Frame) getComponent();
            if (button == minimizeButton) {
                frameLocal.setVisible(false);
            } else if (button == maximizeButton) {
                frameLocal.moveToFront();
                frameLocal.setMaximized(!frameLocal.isMaximized());
            } else if (button == closeButton) {
                frameLocal.close();
            }
        }
    };
    minimizeButton.getButtonPressListeners().add(buttonPressListener);
    maximizeButton.getButtonPressListeners().add(buttonPressListener);
    closeButton.getButtonPressListeners().add(buttonPressListener);
    frame.add(resizeHandle);
    iconAdded(frame, null);
    titleChanged(frame, null);
    activeChanged(frame, null);
    maximizedChanged(frame);
    setShowMinimizeButton(false);
}
Also used : ButtonPressListener(org.apache.pivot.wtk.ButtonPressListener) Frame(org.apache.pivot.wtk.Frame) PushButton(org.apache.pivot.wtk.PushButton) Button(org.apache.pivot.wtk.Button) DropShadowDecorator(org.apache.pivot.wtk.effects.DropShadowDecorator)

Example 2 with DropShadowDecorator

use of org.apache.pivot.wtk.effects.DropShadowDecorator in project pivot by apache.

the class TerraSheetSkin method install.

@Override
public void install(Component component) {
    super.install(component);
    Sheet sheet = (Sheet) component;
    sheet.getSheetStateListeners().add(this);
    // Attach the drop-shadow decorator
    if (!themeIsFlat()) {
        dropShadowDecorator = new DropShadowDecorator();
        sheet.getDecorators().add(dropShadowDecorator);
    }
    sheet.add(resizeHandle);
}
Also used : DropShadowDecorator(org.apache.pivot.wtk.effects.DropShadowDecorator) Sheet(org.apache.pivot.wtk.Sheet)

Example 3 with DropShadowDecorator

use of org.apache.pivot.wtk.effects.DropShadowDecorator in project pivot by apache.

the class TerraSuggestionPopupSkin method install.

@Override
public void install(Component component) {
    super.install(component);
    SuggestionPopup suggestionPopup = (SuggestionPopup) component;
    suggestionPopup.getSuggestionPopupListeners().add(this);
    suggestionPopup.getSuggestionPopupSelectionListeners().add(this);
    suggestionPopup.getSuggestionPopupStateListeners().add(this);
    suggestionPopup.setContent(listViewBorder);
    listView.setListData(suggestionPopup.getSuggestionData());
    listView.setItemRenderer(suggestionPopup.getSuggestionRenderer());
    if (!themeIsFlat()) {
        // Attach the drop-shadow decorator
        dropShadowDecorator = new DropShadowDecorator();
        suggestionPopup.getDecorators().add(dropShadowDecorator);
    }
}
Also used : SuggestionPopup(org.apache.pivot.wtk.SuggestionPopup) DropShadowDecorator(org.apache.pivot.wtk.effects.DropShadowDecorator)

Example 4 with DropShadowDecorator

use of org.apache.pivot.wtk.effects.DropShadowDecorator in project pivot by apache.

the class TerraMenuPopupSkin method install.

@Override
public void install(Component component) {
    super.install(component);
    MenuPopup menuPopup = (MenuPopup) component;
    menuPopup.getMenuPopupListeners().add(this);
    menuPopup.getMenuPopupStateListeners().add(this);
    Menu menu = menuPopup.getMenu();
    if (menu != null) {
        menu.getMenuItemSelectionListeners().add(menuItemSelectionListener);
    }
    panorama.setView(menu);
    menuPopup.setContent(border);
    // Attach the drop-shadow decorator
    if (!themeIsFlat()) {
        dropShadowDecorator = new DropShadowDecorator();
        menuPopup.getDecorators().add(dropShadowDecorator);
    }
}
Also used : MenuPopup(org.apache.pivot.wtk.MenuPopup) Menu(org.apache.pivot.wtk.Menu) DropShadowDecorator(org.apache.pivot.wtk.effects.DropShadowDecorator)

Example 5 with DropShadowDecorator

use of org.apache.pivot.wtk.effects.DropShadowDecorator in project pivot by apache.

the class TerraTooltipSkin method install.

@Override
public void install(Component component) {
    super.install(component);
    Tooltip tooltip = (Tooltip) component;
    dropShadowDecorator = new DropShadowDecorator(5, 2, 2);
    tooltip.getDecorators().add(dropShadowDecorator);
}
Also used : Tooltip(org.apache.pivot.wtk.Tooltip) DropShadowDecorator(org.apache.pivot.wtk.effects.DropShadowDecorator)

Aggregations

DropShadowDecorator (org.apache.pivot.wtk.effects.DropShadowDecorator)7 Button (org.apache.pivot.wtk.Button)1 ButtonPressListener (org.apache.pivot.wtk.ButtonPressListener)1 Frame (org.apache.pivot.wtk.Frame)1 Menu (org.apache.pivot.wtk.Menu)1 MenuPopup (org.apache.pivot.wtk.MenuPopup)1 Palette (org.apache.pivot.wtk.Palette)1 PushButton (org.apache.pivot.wtk.PushButton)1 Sheet (org.apache.pivot.wtk.Sheet)1 SuggestionPopup (org.apache.pivot.wtk.SuggestionPopup)1 Tooltip (org.apache.pivot.wtk.Tooltip)1 FrameButton (org.apache.pivot.wtk.skin.terra.TerraFrameSkin.FrameButton)1