Package org.openide.nodes

Examples of org.openide.nodes.Sheet


        setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.displayName"));
    }

    @Override
    protected Sheet createSheet() {
        Sheet sheet = Sheet.createDefault();
        PreviewController controller = Lookup.getDefault().lookup(PreviewController.class);
        PreviewModel model = controller.getModel();
        if (model != null) {
            NodeSupervisor ns = model.getNodeSupervisor();
            GlobalEdgeSupervisor ges = model.getGlobalEdgeSupervisor();
            SelfLoopSupervisor sls = model.getSelfLoopSupervisor();
            EdgeSupervisor unes = model.getUndirectedEdgeSupervisor();
            EdgeSupervisor ues = model.getUniEdgeSupervisor();
            EdgeSupervisor bes = model.getBiEdgeSupervisor();

            Sheet.Set nodeSet = Sheet.createPropertiesSet();
            nodeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Node.displayName"));
            nodeSet.setName("nodes");

            Sheet.Set edgeSet = Sheet.createPropertiesSet();
            edgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Edge.displayName"));
            edgeSet.setName("edges");

            Sheet.Set selfLoopSet = Sheet.createPropertiesSet();
            selfLoopSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.SelfLoop.displayName"));
            selfLoopSet.setName("selfLoops");

            Sheet.Set undirectedEdgeSet = Sheet.createPropertiesSet();
            undirectedEdgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Undirected.displayName"));
            undirectedEdgeSet.setName("undirectedEdges");

            Sheet.Set uniEdgeSet = Sheet.createPropertiesSet();
            uniEdgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Directed.displayName"));
            uniEdgeSet.setName("uniEdges");

            Sheet.Set biEdgeSet = Sheet.createPropertiesSet();
            biEdgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Mutual.displayName"));
            biEdgeSet.setName("biEdges");

            for (SupervisorPropery p : ns.getProperties()) {
                nodeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : ges.getProperties()) {
                edgeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : sls.getProperties()) {
                selfLoopSet.put(p.getProperty());
            }

            for (SupervisorPropery p : unes.getProperties()) {
                undirectedEdgeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : ues.getProperties()) {
                uniEdgeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : bes.getProperties()) {
                biEdgeSet.put(p.getProperty());
            }

            sheet.put(nodeSet);
            sheet.put(edgeSet);
            sheet.put(selfLoopSet);
            sheet.put(undirectedEdgeSet);
            sheet.put(uniEdgeSet);
            sheet.put(biEdgeSet);
        }
        return sheet;
    }
View Full Code Here


        for (String key : entity.keySet()) {
            if (key.equals("eai:acl") || key.equals("eai:attributes"))
                continue;
            props.put(new StanzaProperty(entity, key));
        }
        Sheet sheet = Sheet.createDefault();
        sheet.put(props);
        return sheet;
    }
View Full Code Here

    public void add(Class datatype, String getter, String setter) {
        add(new PropertyInfo(datatype, getter, setter));
    }

    public Sheet createSheet(Object object) {
        Sheet sheet = Sheet.createDefault();
        Sheet.Set props = Sheet.createPropertiesSet();
        try {
            for (PropertyInfo info : this) {
                props.put(new PropertySupport.Reflection(
                    object, info.datatype, info.getter, info.setter));
            }
        }
        catch (NoSuchMethodException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
        sheet.put(props);
        return sheet;
    }
View Full Code Here

                language = (String)getPrimaryFile().getAttribute(LANGUAGE);
            return language;
        }

        public Sheet createSheet() {
            Sheet sheet;
            Sheet.Set props;
            Node.Property prop;

            sheet = super.createSheet();
            props = sheet.get(Sheet.PROPERTIES);
            if (props == null) {
                props = Sheet.createPropertiesSet();
                sheet.put(props);
            }
       
            // prop = createLocationProperty();
            // props.put(prop);
View Full Code Here

        return Utilities.loadImage(GERONIMO_ICON) ;
    }
   
    @Override
    protected Sheet createSheet() {
        Sheet sheet = super.createSheet() ;
       
        Sheet.Set properties = sheet.get(Sheet.PROPERTIES) ;
        if(properties == null) {
            properties = Sheet.createPropertiesSet() ;
            sheet.put(properties) ;
        }
       
        Node.Property property ;
       
        property = new PropertySupport.ReadWrite(
View Full Code Here

    }

    @Override
    protected Sheet createSheet() {

        Sheet sheet = Sheet.createDefault();
        Sheet.Set set = Sheet.createPropertiesSet();
        OUser obj = getOUser();

        try {
            Property UserNameProp = new PropertySupport.Reflection<String>(obj, String.class, "getUserName", null);
            UserNameProp.setName(Utils.getBundle().getString("LBL_UUserName"));
            set.put(UserNameProp);

            Property SavePasswordProp = new PropertySupport.Reflection<Boolean>(obj, Boolean.class, "getSavePassword", null);
            SavePasswordProp.setName(Utils.getBundle().getString("LBL_USavePassword"));
            set.put(SavePasswordProp);

            Property ConnectRoleProp = new PropertySupport.Reflection<RoleTypes>(obj, RoleTypes.class, "getConnectRole", null);
            ConnectRoleProp.setName(Utils.getBundle().getString("LBL_UConnectAs"));
            set.put(ConnectRoleProp);

            Property IsConnectedProp = new PropertySupport.Reflection<Boolean>(obj, Boolean.class, "getIsConnected", null);
            IsConnectedProp.setName(Utils.getBundle().getString("LBL_UConnected"));
            set.put(IsConnectedProp);

        } catch (NoSuchMethodException ex) {
            ErrorManager.getDefault();
        }

        sheet.put(set);
        return sheet;
    }
View Full Code Here

    @Override
    @SuppressWarnings("unchecked")
    protected Sheet createSheet() {

        Sheet sheet = Sheet.createDefault();
        Sheet.Set set = Sheet.createPropertiesSet();
        BaseClass obj = getBaseClass();

        try {
            Property ObjectNameProp = new PropertySupport.Reflection<String>(obj, String.class, "toString", null);
            Property ObjectTypeProp = new PropertySupport.Reflection<ObjectTypes>(obj, ObjectTypes.class, "getObjectType", null);
            Property CreatedProp = new PropertySupport.Reflection<Date>(obj, Date.class, "getCreated", null);
            Property LastDDLTimeProp = new PropertySupport.Reflection<Date>(obj, Date.class, "getLastDDLTime", null);
            Property StatusProp = new PropertySupport.Reflection<String>(obj, String.class, "getStatus", null);
            PropertySupport.Reflection LocalFileProp = new PropertySupport.Reflection<String>(obj, String.class, "getLocalFile", "setLocalFile");

            ObjectNameProp.setName(Utils.getBundle().getString("LBL_OName"));
            ObjectTypeProp.setName(Utils.getBundle().getString("LBL_OType"));
            CreatedProp.setName(Utils.getBundle().getString("LBL_OCreated"));
            LastDDLTimeProp.setName(Utils.getBundle().getString("LBL_OLastDDLTime"));
            StatusProp.setName(Utils.getBundle().getString("LBL_OStatus"));
            LocalFileProp.setName(Utils.getBundle().getString("LBL_OLocalFile"));
            LocalFileProp.setPropertyEditorClass(LocalFileEditor.class);

            set.put(ObjectNameProp);
            set.put(ObjectTypeProp);
            set.put(CreatedProp);
            set.put(LastDDLTimeProp);
            set.put(StatusProp);
            set.put(LocalFileProp);

        } catch (NoSuchMethodException ex) {
            ErrorManager.getDefault();
        }

        sheet.put(set);
        return sheet;
    }
View Full Code Here

    }

    @Override
    protected Sheet createSheet() {

        Sheet sheet = Sheet.createDefault();
        Sheet.Set set = Sheet.createPropertiesSet();
        OConnectionClass obj = getOConnectionClass();

        try {
            Property ServerNameProp = new PropertySupport.Reflection<String>(obj, String.class, "getServerName", null);
            ServerNameProp.setName(Utils.getBundle().getString("LBL_ServerName"));
            set.put(ServerNameProp);

            Property PortProp = new PropertySupport.Reflection<Integer>(obj, Integer.class, "getPort", null);
            PortProp.setName(Utils.getBundle().getString("LBL_Port"));
            set.put(PortProp);

            Property DatabaseNameProp = new PropertySupport.Reflection<String>(obj, String.class, "getDatabaseName", null);
            DatabaseNameProp.setName(Utils.getBundle().getString("LBL_DatabaseName"));
            set.put(DatabaseNameProp);

            Property OracleProductVersionProp = new PropertySupport.Reflection<String>(obj, String.class, "getOracleProductVersion", null);
            OracleProductVersionProp.setName(Utils.getBundle().getString("LBL_DatabaseProduct"));
            set.put(OracleProductVersionProp);

            Property OracleVersionProp = new PropertySupport.Reflection<String>(obj, String.class, "getOracleVersion", null);
            OracleVersionProp.setName(Utils.getBundle().getString("LBL_DatabaseVersion"));
            set.put(OracleVersionProp);

        } catch (NoSuchMethodException ex) {
            ErrorManager.getDefault();
        }

        sheet.put(set);
        return sheet;
    }
View Full Code Here

                language = (String)getPrimaryFile().getAttribute(LANGUAGE);
            return language;
        }

        public Sheet createSheet() {
            Sheet sheet;
            Sheet.Set props;
            Node.Property prop;

            sheet = super.createSheet();
            props = sheet.get(Sheet.PROPERTIES);
            if (props == null) {
                props = Sheet.createPropertiesSet();
                sheet.put(props);
            }
       
            // prop = createLocationProperty();
            // props.put(prop);
View Full Code Here

                language = (String)getPrimaryFile().getAttribute(LANGUAGE);
            return language;
        }

        public Sheet createSheet() {
            Sheet sheet;
            Sheet.Set props;
            Node.Property prop;

            sheet = super.createSheet();
            props = sheet.get(Sheet.PROPERTIES);
            if (props == null) {
                props = Sheet.createPropertiesSet();
                sheet.put(props);
            }
       
            // prop = createLocationProperty();
            // props.put(prop);
View Full Code Here

TOP

Related Classes of org.openide.nodes.Sheet

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.