Search in sources :

Example 6 with ToolbarModel

use of delta.common.ui.swing.toolbar.ToolbarModel in project lotro-companion by dmorcellet.

the class MainFrameController method buildToolBar.

private ToolbarController buildToolBar() {
    ToolbarController controller = new ToolbarController();
    ToolbarModel model = controller.getModel();
    // Levelling icon
    String levellingIconPath = getToolbarIconPath("levelling");
    ToolbarIconItem levellingIconItem = new ToolbarIconItem(LEVELLING_ID, levellingIconPath, LEVELLING_ID, "Levelling...", "Levelling");
    model.addToolbarIconItem(levellingIconItem);
    // Warbands icon
    String warbandsIconPath = getToolbarIconPath("warbands");
    ToolbarIconItem warbandsIconItem = new ToolbarIconItem(WARBANDS_ID, warbandsIconPath, WARBANDS_ID, "Warbands...", "Warbands");
    model.addToolbarIconItem(warbandsIconItem);
    // Reputation synopsis icon
    String reputationSynopsisIconPath = getToolbarIconPath("reputation");
    ToolbarIconItem reputationSynopsisIconItem = new ToolbarIconItem(REPUTATION_SYNOPSIS_ID, reputationSynopsisIconPath, REPUTATION_SYNOPSIS_ID, "Reputation synopsis...", "Reputation synopsis");
    model.addToolbarIconItem(reputationSynopsisIconItem);
    // Crafting synopsis icon
    String craftingSynopsisIconPath = getToolbarIconPath("crafting");
    ToolbarIconItem craftingSynopsisIconItem = new ToolbarIconItem(CRAFTING_SYNOPSIS_ID, craftingSynopsisIconPath, CRAFTING_SYNOPSIS_ID, "Crafting synopsis...", "Crafting synopsis");
    model.addToolbarIconItem(craftingSynopsisIconItem);
    // Map icon
    String mapIconPath = getToolbarIconPath("globe");
    ToolbarIconItem mapIconItem = new ToolbarIconItem(MAP_ID, mapIconPath, MAP_ID, "Map...", "Map");
    model.addToolbarIconItem(mapIconItem);
    // Deeds icon
    String deedsIconPath = getToolbarIconPath("deeds");
    ToolbarIconItem deedsIconItem = new ToolbarIconItem(DEEDS_ID, deedsIconPath, DEEDS_ID, "Deeds...", "Deeds");
    model.addToolbarIconItem(deedsIconItem);
    // Register action listener
    controller.addActionListener(this);
    return controller;
}
Also used : ToolbarController(delta.common.ui.swing.toolbar.ToolbarController) ToolbarIconItem(delta.common.ui.swing.toolbar.ToolbarIconItem) ToolbarModel(delta.common.ui.swing.toolbar.ToolbarModel)

Aggregations

ToolbarController (delta.common.ui.swing.toolbar.ToolbarController)6 ToolbarIconItem (delta.common.ui.swing.toolbar.ToolbarIconItem)6 ToolbarModel (delta.common.ui.swing.toolbar.ToolbarModel)6