Examples of PanelWithBackground


Examples of org.tools.ui.PanelWithBackground

     *
     */
    public GameCenterDialog() {
        super("Game Center");

        JPanel content = new PanelWithBackground(IOManager.getAsImage(Places.GraphicsIcons, "misc/dialog.background.png"));

        content.setLayout(new MigLayout("wrap 2", "[][grow]", "[][grow][]"));
        content.add(createMenuBar(), "span 2");
        content.add(createMemberList(), "wmin 150, growy, spany 2");
        content.add(createChatPane(), "grow");
        content.add(createChatInput(), "growx");

        setContent(content);
    }
View Full Code Here

Examples of org.tools.ui.PanelWithBackground

     * Setup of the dialog. Also starts the scanner and searches for scenarios.
     */
    public LocalScenarioSetupDialog() {
        super("Local Scenario");

        JPanel content = new PanelWithBackground(IOManager.getAsImage(Places.GraphicsIcons, "misc/dialog.background.png"));

        LocalClient.CONTEXT.addHandler(handler);
        LocalClient.CONTEXT.send(Message.SETUP_GET_SCENARIOS_LIST.createNew());

        JList<TitleListEntry> titleList = new JList<>();
        titleList.setOpaque(false);
        titleList.setBorder(CommonElements.createBorder("Scenarios"));
        titleList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        titleList.setModel(titleListModel);

        titleList.setCellRenderer(new OurListCellRenderer(new OurListCellRenderer.ListCellInfoProvider() {
            @Override
            public String getToolTip(Object value) {
                // cast to TitleListEntry, we know it's one
                TitleListEntry entry = (TitleListEntry) value;
                return String.format("%s", entry.title);
            }
        }));

        // listen to the list and update the selected scenario upon selection
        titleList.addListSelectionListener(new ListSelectionListener() {
            @Override
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    Integer id = titleListModel.getElementAt(e.getFirstIndex()).id;
                    LocalClient.CONTEXT.send(Message.SETUP_GET_SCENARIO_INFO.createNew(id));
                }
            }
        });

        // layout - selectTree fixed width, infoPanel fixed height
        content.setLayout(new MigLayout("wrap 1, fill", "", "[][fill, grow][]"));
        content.add(makeMenuBar());
        content.add(titleList, "width 200!, split 2");
        content.add(makeMapPanel(), "grow");
        content.add(makeInfoPanel(), "height 200!, growx");

        setContent(content);
    }
View Full Code Here

Examples of org.tools.ui.PanelWithBackground

        JPanel languageArea = new JPanel();
        languageArea.setOpaque(false);
        languageArea.setBorder(CommonElements.createBorder("Language"));

        // create panel and set layout
        JPanel panel = new PanelWithBackground(IOManager.getAsImage(Places.GraphicsIcons, "misc/dialog.background.png"));
        panel.setLayout(new MigLayout("flowy"));
        panel.add(graphicsArea, "sizegroupx");
        panel.add(languageArea, "sizegroupx");

        return panel;
    }
View Full Code Here

Examples of org.tools.ui.PanelWithBackground

        // components
        JTextField networkAlias = new JTextField();
        items.add(new OptionsDialogTextFieldItem(networkAlias, Option.Client_Alias));

        // create panel and set layout
        JPanel panel = new PanelWithBackground(IOManager.getAsImage(Places.GraphicsIcons, "misc/dialog.background.png"));
        panel.setLayout(new MigLayout("wrap 2, fillx", "[][grow]"));
        panel.add(statusPanel, "span 2");
        panel.add(new JLabel("Start/stop local server"));
        panel.add(serverToggleButton);
        panel.add(new JLabel("Default network name"));
        panel.add(networkAlias, "wmin 200");

        return panel;
    }
View Full Code Here

Examples of org.tools.ui.PanelWithBackground

                }
            }
        });

        // create panel and set layout
        JPanel panel = new PanelWithBackground(IOManager.getAsImage(Places.GraphicsIcons, "misc/dialog.background.png"));
        panel.setLayout(new MigLayout("wrap 2"));
        panel.add(new JLabel("Available devices"));
        panel.add(mixerBox);
        panel.add(muteSound);

        return panel;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.