Package lcmc.common.ui

Examples of lcmc.common.ui.Info


                initOCFMetaDataAll();
                final String hn = host.getName();
                final String text = Tools.getString("CRMXML.GetRAMetaData.Done");
                guiData.startProgressIndicator(hn, text);
                allServicesInfo.setAllResources(allServicesInfo.getBrowser().getClusterStatus(), Application.RunMode.LIVE);
                final Info lastSelectedInfo = allServicesInfo.getBrowser().getClusterViewPanel().getLastSelectedInfo();
                if (lastSelectedInfo instanceof ServiceInfo || lastSelectedInfo instanceof ServicesInfo) {
                    allServicesInfo.getBrowser().getClusterViewPanel().reloadRightComponent();
                }
                guiData.stopProgressIndicator(hn, text);
                LOG.debug("CRMXML: RAs loaded");
View Full Code Here


                if (bdi == null) {
                    return "";
                }
                l = bdi.getDrbdVolumeInfo().getDevice();
            } else {
                final Info info = getInfo(v);
                if (info == null) {
                    return "";
                }
                l = info.getMainTextForGraph();
            }
            if (l.length() > MAX_VERTEX_STRING_LENGTH) {
                l = "..." + l.substring(l.length() - MAX_VERTEX_STRING_LENGTH + 3, l.length());
            }
            return l;
View Full Code Here

    }

    /** Handles popup in when block device vertex is clicked. */
    @Override
    protected void handlePopupVertex(final Vertex v, final List<Vertex> pickedV, final Point2D pos) {
        final Info info;
        if (pickedV.size() > 1) {
            info = multiSelectionInfo;
        } else if (isVertexBlockDevice(v)) {
            info = getInfo(v);
        } else {
            /* host */
            info = getInfo(v);
        }
        if (info != null) {
            final JPopupMenu p = info.getPopup();
            info.updateMenus(pos);
            showPopup(p, pos);
        }
    }
View Full Code Here

    }

    /** Returns tool tip when mouse is over a block device vertex. */
    @Override
    public String getVertexToolTip(final Vertex v) {
        final Info i = getInfo(v);
        if (i == null) {
            return null;
        }
        return i.getToolTipForGraph(getRunMode());
    }
View Full Code Here

    /** Select multiple elements. */
    @Override
    protected void multiSelection() {
        final List<Info> selectedInfos = new ArrayList<Info>();
        for (final Vertex v : getPickedVertices()) {
            final Info i = getInfo(v);
            if (i != null) {
                selectedInfos.add(i);
            }
        }
        multiSelectionInfo.init(selectedInfos, getClusterBrowser());
View Full Code Here

            final boolean expanded,
            final boolean leaf,
            final int row,
            final boolean hasFocus) {
        super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
        final Info info = (Info) ((DefaultMutableTreeNode) value).getUserObject();
        if (info == null) {
            return this;
        }
        if (leaf) {
            final ImageIcon icon = info.getMenuIcon(Application.RunMode.LIVE);
            if (icon != null) {
                setIcon(icon);
            }
            setToolTipText("");
        } else {
            setToolTipText("");
            ImageIcon icon = info.getCategoryIcon(Application.RunMode.LIVE);
            if (icon == null) {
                icon = CategoryInfo.CATEGORY_ICON;
            }
            setIcon(icon);
        }
View Full Code Here

            @Override
            public void mousePressed(final MouseEvent e) {
                final int selRow = tree.getRowForLocation(e.getX(), e.getY());
                final TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
                if (selRow != -1 && e.getButton() > 1) {
                    final Info nodeInfo =
                            (Info) ((DefaultMutableTreeNode) selPath.getLastPathComponent()).getUserObject();
                    if (nodeInfo != null) {
                        nodeInfo.showPopup(tree, e.getX(), e.getY());
                        tree.setSelectionPath(selPath);
                    }
                }
            }
View Full Code Here

            @Override
            public void run() {
                int i = 0;
                for (int j = 0; j < parent.getChildCount(); j++) {
                    final DefaultMutableTreeNode node = (DefaultMutableTreeNode) parent.getChildAt(j);
                    final Info info = (Info) node.getUserObject();
                    final String name = info.getName();
                    if (i > 0) {
                        final DefaultMutableTreeNode prev = (DefaultMutableTreeNode) parent.getChildAt(j - 1);
                        final Info prevI = (Info) prev.getUserObject();
                        if (prevI.getClass().getName().equals(info.getClass().getName())) {
                            final String prevN = prevI.getName();
                            if (!prevI.getResource().isNew()
                                    && !info.getResource().isNew()
                                    && (prevN != null && prevN.compareTo(name) > 0)) {
                                parent.remove(j);
                                parent.insert(node, j - 1);
                            }
View Full Code Here

        if (nodeToRemove == null) {
            return;
        }
        final MutableTreeNode parent = (MutableTreeNode) nodeToRemove.getParent();
        nodeToRemove.removeFromParent();
        final Info info = (Info) nodeToRemove.getUserObject();
        if (info != null) {
            info.setNode(null);
        }
        if (parent != null) {
            reloadNode(parent, true);
        }
    }
View Full Code Here

            final JPanel optionsPanel,
            final int leftWidth,
            final int rightWidth,
            final CloneInfo ci) {
        final String[] params = ci.getParametersFromXML();
        final Info savedMAIdRef = ci.getSavedMetaAttrInfoRef();
        ci.getResource().setValue(GUI_ID, new StringValue(ci.getService().getId()));
        ci.addParams(optionsPanel,
                     params,
                     application.getServiceLabelWidth(),
                     application.getServiceFieldWidth(),
View Full Code Here

TOP

Related Classes of lcmc.common.ui.Info

Copyright © 2018 www.massapicom. 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.