Java Code Examples for org.openide.nodes.PropertySupport#Name

The following examples show how to use org.openide.nodes.PropertySupport#Name . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProcedureParamNode.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private void updateProperties(Parameter param) {
    PropertySupport<String> ps = new PropertySupport.Name(this);
    addProperty(ps);

    switch (param.getDirection()) {
        case IN:
            addProperty(TYPE, TYPEDESC, String.class, false, NbBundle.getMessage (ProcedureParamNode.class, "In")); // NOI18N
            break;
        case OUT:
            addProperty(TYPE, TYPEDESC, String.class, false, NbBundle.getMessage (ProcedureParamNode.class, "Out")); // NOI18N
            break;
        case INOUT:
            addProperty(TYPE, TYPEDESC, String.class, false, NbBundle.getMessage (ProcedureParamNode.class, "InOut")); // NOI18N
            break;
    }

    addProperty(DATATYPE, DATATYPEDESC, String.class, false, param.getType() == null ? "null" : param.getType().toString()); // NOI18N

    addProperty(DBDATATYPE, DBDATATYPEDESC, String.class, false,
            param.getTypeName() == null ? "" : param.getTypeName());
}
 
Example 2
Source File: ForeignKeyColumnNode.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private void updateProperties(ForeignKeyColumn column) {
    PropertySupport ps = new PropertySupport.Name(this);
    addProperty(ps);

    try {
        Column referred = column.getReferredColumn();
        Column referring = column.getReferringColumn();

        addProperty(FKPOSITION, FKPOSITIONDESC, Integer.class, false, column.getPosition());
        addProperty(FKREFERRINGSCHEMA, FKREFERRINGSCHEMADESC, String.class, false, referring.getParent().getParent().getName());
        addProperty(FKREFERRINGTABLE, FKREFERRINGTABLEDESC, String.class, false, referring.getParent().getName());
        addProperty(FKREFERRINGCOLUMN, FKREFERRINGCOLUMNDESC, String.class, false, referring.getName());
        addProperty(FKREFERREDSCHEMA, FKREFERREDSCHEMADESC, String.class, false, referred.getParent().getParent().getName());
        addProperty(FKREFERREDTABLE, FKREFERREDTABLEDESC, String.class, false, referred.getParent().getName());
        addProperty(FKREFERREDCOLUMN, FKREFERREDCOLUMNDESC, String.class, false, referred.getName());

    } catch (Exception e) {
        Exceptions.printStackTrace(e);
    }
}
 
Example 3
Source File: BrokenDataShadow.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/** Modifies the sheet set to contain name of property and name of
* original object.
*/
private void modifySheetSet (Sheet.Set ss) {
    Property p = ss.remove (DataObject.PROP_NAME);
    if (p != null) {
        p = new PropertySupport.Name (this);
        ss.put (p);

        p = new Name ();
        ss.put (p);
    }
}
 
Example 4
Source File: TableNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void updateProperties(Table table) {
    PropertySupport.Name ps = new PropertySupport.Name(TableNode.this);
    addProperty(ps);

    addProperty(CATALOG, CATALOGDESC, String.class, false, getCatalogName());
    addProperty(SCHEMA, SCHEMADESC, String.class, false, getSchemaName());
    addProperty(SYSTEM, SYSTEMDESC, Boolean.class, false, isSystem());
}
 
Example 5
Source File: ReturnValueNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void updateProperties(Value param) {
    PropertySupport ps = new PropertySupport.Name(this);
    addProperty(ps);

    addProperty(TYPE, TYPEDESC, String.class, false, NbBundle.getMessage (ReturnValueNode.class, "Return")); // NOI18N
    addProperty(DATATYPE, DATATYPEDESC, String.class, false, param.getType().toString());

    addProperty(DBDATATYPE, DBDATATYPEDESC, String.class, false,
            param.getTypeName() == null ? "" : param.getTypeName());
}
 
Example 6
Source File: ProcedureNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void updateProperties(Procedure proc) {
    PropertySupport.Name ps = new PropertySupport.Name(this);
    addProperty(ps);

    if (proc.getReturnValue() == null) {
        addProperty(TYPE, TYPEDESC, String.class, false, NbBundle.getMessage (ProcedureNode.class, "StoredProcedure")); // NOI18N
    } else {
        addProperty(TYPE, TYPEDESC, String.class, false, NbBundle.getMessage (ProcedureNode.class, "StoredFunction")); // NOI18N
    }
}
 
Example 7
Source File: IndexNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private void updateProperties(Index index) {
    PropertySupport.Name ps = new PropertySupport.Name(this);
    addProperty(ps);

    addProperty(UNIQUE, UNIQUEDESC, Boolean.class, false, index.isUnique());
}
 
Example 8
Source File: ViewNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private void updateProperties(View view) {
    PropertySupport.Name ps = new PropertySupport.Name(this);
    addProperty(ps);
}
 
Example 9
Source File: IndexColumnNode.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private void updateProperties(IndexColumn column) {
    PropertySupport ps = new PropertySupport.Name(this);
    addProperty(ps);

    addProperty(POSITION, POSITIONDESC, Integer.class, false, column.getPosition());
}