Examples of MyButton


Examples of lcmc.common.ui.utils.MyButton

                                           final Map<String, InterfaceData> interfaces,
                                           final boolean opaque) {
        if (interfaces == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove",
                                                ClusterBrowser.REMOVE_ICON_SMALL,
                                                "Remove " + mac);
        application.makeMiniButton(removeBtn);
        final InterfaceData interfaceData = interfaces.get(mac);
        if (interfaceData == null) {
            return new Object[]{mac, "unknown", removeBtn};
        }
        final StringBuilder interf = new StringBuilder(20);
        interf.append(mac);
        final String dev = interfaceData.getTargetDev();
        if (dev != null) {
            interf.append(' ');
            interf.append(dev);
        }
        if (iToInfo != null) {
            final InterfaceInfo vii = interfaceToInfo.get(mac);
            iToInfo.put(interf.toString(), vii);
        }
        final MyButton iLabel = widgetFactory.createButton(interf.toString(), NetInfo.NET_INTERFACE_ICON_LARGE);
        iLabel.setOpaque(opaque);
        final StringBuilder source = new StringBuilder(20);
        final String type = interfaceData.getType();
        final String s;
        if ("network".equals(type)) {
            s = interfaceData.getSourceNetwork();
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

                                          final Map<String, InputDevData> inputDevs,
                                          final boolean opaque) {
        if (inputDevs == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + index);
        application.makeMiniButton(removeBtn);
        final InputDevData inputDevData = inputDevs.get(index);
        if (inputDevData == null) {
            return new Object[]{index + ": unknown", "", removeBtn};
        }
        if (iToInfo != null) {
            final InputDevInfo vidi = inputDevToInfo.get(index);
            iToInfo.put(index, vidi);
        }
        final MyButton iLabel = widgetFactory.createButton(index, null);
        iLabel.setOpaque(opaque);
        return new Object[]{iLabel, removeBtn};
    }
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

                                          final Map<String, GraphicsData> graphicDisplays,
                                          final boolean opaque) {
        if (graphicDisplays == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + index);
        application.makeMiniButton(removeBtn);
        final GraphicsData graphicsData = graphicDisplays.get(index);
        if (graphicsData == null) {
            return new Object[]{index + ": unknown", "", removeBtn};
        }
        if (iToInfo != null) {
            final GraphicsInfo vidi = graphicsToInfo.get(index);
            iToInfo.put(index, vidi);
        }
        final MyButton iLabel = widgetFactory.createButton(index, VNC_ICON);
        iLabel.setOpaque(opaque);
        return new Object[]{iLabel, removeBtn};
    }
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

                                       final Map<String, SoundData> sounds,
                                       final boolean opaque) {
        if (sounds == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + index);
        application.makeMiniButton(removeBtn);
        final SoundData soundData = sounds.get(index);
        if (soundData == null) {
            return new Object[]{index + ": unknown", "", removeBtn};
        }
        final String model = soundData.getModel();
        if (iToInfo != null) {
            final SoundInfo vidi = soundToInfo.get(index);
            iToInfo.put(index, vidi);
        }
        final MyButton iLabel = widgetFactory.createButton(model, null);
        iLabel.setOpaque(opaque);
        return new Object[]{iLabel, removeBtn};
    }
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

                                        final Map<String, SerialData> serials,
                                        final boolean opaque) {
        if (serials == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + index);
        application.makeMiniButton(removeBtn);
        final SerialData serialData = serials.get(index);
        if (serialData == null) {
            return new Object[]{index + ": unknown", "", removeBtn};
        }
        if (iToInfo != null) {
            final SerialInfo vidi = serialToInfo.get(index);
            iToInfo.put(index, vidi);
        }
        final MyButton iLabel = widgetFactory.createButton(index, null);
        iLabel.setOpaque(opaque);
        return new Object[]{iLabel, removeBtn};
    }
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

                                          final Map<String, ParallelData> parallels,
                                          final boolean opaque) {
        if (parallels == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + index);
        application.makeMiniButton(removeBtn);
        final ParallelData parallelData = parallels.get(index);
        if (parallelData == null) {
            return new Object[]{index + ": unknown", "", removeBtn};
        }
        if (iToInfo != null) {
            final ParallelInfo vidi = parallelToInfo.get(index);
            iToInfo.put(index, vidi);
        }
        final MyButton iLabel = widgetFactory.createButton(index, null);
        iLabel.setOpaque(opaque);
        return new Object[]{iLabel, removeBtn};
    }
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

                                       final Map<String, VideoData> videos,
                                       final boolean opaque) {
        if (videos == null) {
            return new Object[0];
        }
        final MyButton removeBtn = widgetFactory.createButton("Remove", ClusterBrowser.REMOVE_ICON_SMALL, "Remove " + index);
        application.makeMiniButton(removeBtn);
        final VideoData videoData = videos.get(index);
        if (videoData == null) {
            return new Object[]{index + ": unknown", "", removeBtn};
        }
        final String modelType = videoData.getModelType();
        if (iToInfo != null) {
            final VideoInfo vidi = videoToInfo.get(index);
            iToInfo.put(index, vidi);
        }
        final MyButton iLabel = widgetFactory.createButton(modelType, null);
        iLabel.setOpaque(opaque);
        return new Object[]{iLabel, removeBtn};
    }
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

    /** Sets all host buttons. */
    private void setHostButtons(final boolean running) {
        for (final Host h : getBrowser().getClusterHosts()) {
            final VmsXml vmsXml = getBrowser().getVmsXml(h);
            final MyButton hostBtn = hostButtons.get(h.getName());
            final MyButton wizardHostBtn = hostButtons.get(WIZARD_HOST_PREFIX + h.getName());
            final Widget hostWi = definedOnHostComboBoxHash.get(h.getName());
            final Widget wizardHostWi = definedOnHostComboBoxHash.get(WIZARD_HOST_PREFIX + h.getName());
            if (vmsXml != null
                && vmsXml.getDomainNames().contains(getDomainName())) {
                if (vmsXml.isRunning(getDomainName())) {
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

    public boolean needFilesystem() {
        return NEED_FILESYSTEM.contains(getWidget(VmsXml.VM_PARAM_DOMAIN_TYPE, null).getStringValue());
    }

    MyButton getNewDiskBtn() {
        final MyButton newBtn = widgetFactory.createButton("Add Disk");
        newBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                final Thread t = new Thread(new Runnable() {
                    @Override
                    public void run() {
View Full Code Here

Examples of lcmc.common.ui.utils.MyButton

        });
        return newBtn;
    }

    MyButton getNewFilesystemBtn() {
        final MyButton newBtn = widgetFactory.createButton("Add Filesystem");
        newBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                final Thread t = new Thread(new Runnable() {
                    @Override
                    public void run() {
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.