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);
}
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);
}
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);
}
}
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);
}
}
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);
}
Aggregations