use of se.trixon.almond.util.icons.IconColor in project java-jotasync by trixon.
the class TabHolder method init.
private void init() {
setFocusTraversalKeysEnabled(false);
mSpeedDialPanel = new SpeedDialPanel();
IconColor iconColor = mAlmondOptions.getIconColor();
add(mSpeedDialPanel, MaterialIcon._Action.HOME.get(AlmondUI.ICON_SIZE_NORMAL, iconColor));
setIconAt(0, MaterialIcon._Action.HOME.get(AlmondUI.ICON_SIZE_NORMAL, iconColor));
HistoryPanel historyPanel = new HistoryPanel();
add(historyPanel, MaterialIcon._Action.HISTORY.get(AlmondUI.ICON_SIZE_NORMAL, iconColor));
setIconAt(1, MaterialIcon._Action.HISTORY.get(AlmondUI.ICON_SIZE_NORMAL, iconColor));
mJobMap.values().stream().forEach((tabItem) -> {
tabItem.updateIcons(iconColor);
});
mManager.addConnectionListeners(this);
mManager.getClient().addServerEventListener(this);
mMenuMouseAdapter = new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (e == null || e.getButton() == MouseEvent.BUTTON1) {
Component component = ((TabListener) getSelectedComponent()).getMenuButton();
JPopupMenu popupMenu = MainFrame.getPopupMenu();
InputMap inputMap = popupMenu.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
ActionMap actionMap = popupMenu.getActionMap();
Action action = new AbstractAction("HideMenu") {
@Override
public void actionPerformed(ActionEvent e) {
popupMenu.setVisible(false);
}
};
String key = "HideMenu";
actionMap.put(key, action);
KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
inputMap.put(keyStroke, key);
if (popupMenu.isVisible()) {
popupMenu.setVisible(false);
} else {
popupMenu.show(component, component.getWidth() - popupMenu.getWidth(), component.getHeight());
int x = component.getLocationOnScreen().x + component.getWidth() - popupMenu.getWidth();
int y = component.getLocationOnScreen().y + component.getHeight();
popupMenu.setLocation(x, y);
}
}
}
};
mSpeedDialPanel.getMenuButton().addMouseListener(mMenuMouseAdapter);
// FIXME Why is this necessary?
setTabLayoutPolicy(SCROLL_TAB_LAYOUT);
setTabLayoutPolicy(WRAP_TAB_LAYOUT);
}
use of se.trixon.almond.util.icons.IconColor in project java-jotasync by trixon.
the class EditPanel method init.
private void init() {
for (Component component : toolBar.getComponents()) {
if (component instanceof AbstractButton) {
AbstractButton button = (AbstractButton) component;
button.setVisible(false);
}
}
IconColor iconColor = mAlmondOptions.getIconColor();
toggleButton.setIcon(MaterialIcon._Action.SCHEDULE.get(ICON_SIZE, iconColor));
addButton.setIcon(MaterialIcon._Content.ADD.get(ICON_SIZE, iconColor));
cloneButton.setIcon(MaterialIcon._Content.CONTENT_COPY.get(ICON_SIZE, iconColor));
editButton.setIcon(MaterialIcon._Editor.MODE_EDIT.get(ICON_SIZE, iconColor));
removeButton.setIcon(MaterialIcon._Content.REMOVE.get(ICON_SIZE, iconColor));
removeAllButton.setIcon(MaterialIcon._Content.CLEAR.get(ICON_SIZE, iconColor));
activateButton.setIcon(MaterialIcon._Navigation.ARROW_BACK.get(ICON_SIZE, iconColor));
deactivateButton.setIcon(MaterialIcon._Navigation.ARROW_FORWARD.get(ICON_SIZE, iconColor));
moveDownButton.setIcon(MaterialIcon._Navigation.ARROW_DOWNWARD.get(ICON_SIZE, iconColor));
moveUpButton.setIcon(MaterialIcon._Navigation.ARROW_UPWARD.get(ICON_SIZE, iconColor));
moveFirstButton.setIcon(MaterialIcon._Editor.VERTICAL_ALIGN_TOP.get(ICON_SIZE, iconColor));
moveLastButton.setIcon(MaterialIcon._Editor.VERTICAL_ALIGN_BOTTOM.get(ICON_SIZE, iconColor));
// list.setModel(mModel);
}
use of se.trixon.almond.util.icons.IconColor in project java-jotasync by trixon.
the class DualListPanel method init.
private void init() {
IconColor iconColor = mAlmondOptions.getIconColor();
removeAllButton.setIcon(MaterialIcon._Content.CLEAR.get(ICON_SIZE, iconColor));
activateButton.setIcon(MaterialIcon._Navigation.ARROW_BACK.get(ICON_SIZE, iconColor));
deactivateButton.setIcon(MaterialIcon._Navigation.ARROW_FORWARD.get(ICON_SIZE, iconColor));
}
Aggregations