Java Code Examples for org.netbeans.api.visual.vmd.VMDPinWidget#setPinName()
The following examples show how to use
org.netbeans.api.visual.vmd.VMDPinWidget#setPinName() .
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: DB_VMDGraph.java From BART with MIT License | 6 votes |
private void createAttribute(String table , Attribute attribute) { VMDPinWidget attributeWidget = (VMDPinWidget)scene.addPin(table,table+attribute.getName()); attributeWidget.setPinName(attribute.getName()); attributeWidget.setToolTipText("Double click for View Table data"); attributeWidget.setLayout(LayoutFactory.createHorizontalFlowLayout( LayoutFactory.SerialAlignment.JUSTIFY, 7)); LabelWidget type = new LabelWidget(scene); type.setForeground(Color.GRAY); type.setLabel(attribute.getType()); attributeWidget.addChild(type); for(Key k : db.getKeys(table)) { for(AttributeRef attr : k.getAttributes()) { if(attr.getName().equals(attribute.getName()) && k.isPrimaryKey()) { LabelWidget pk = new LabelWidget(scene); pk.setForeground(Color.BLUE); pk.setLabel(" PK"); attributeWidget.addChild(pk); } } } }
Example 2
Source File: VmdEgdSceneGenerator.java From Llunatic with GNU General Public License v3.0 | 6 votes |
private List<VMDNodeWidget> createPremiseNodes(VMDGraphScene scene) { List<VMDNodeWidget> result = new ArrayList<VMDNodeWidget>(); for (String commonValue : commonValues.keySet()) { Collection<String> cells = commonValues.get(commonValue); if (cells.size() > 1) { VMDNodeWidget node = (VMDNodeWidget) scene.addNode(commonValue); node.setNodeName(commonValue); node.setBorder(premiseBorder); createNodePin(scene, node); result.add(node); for (String cell : cells) { VMDPinWidget pin = (VMDPinWidget) scene.addPin(commonValue, cell + ":" + commonValue); pin.setPinName(cell); } } } return result; }
Example 3
Source File: VmdTgdDepSceneGenerator.java From Llunatic with GNU General Public License v3.0 | 5 votes |
private void addAtom(RelationalAtom atom) { logger.debug("FORMULA ATOM: " + atom.toString()); String atomId = atom.getTableNameWithAlias(); VMDNodeWidget n1 = (VMDNodeWidget) scene.addNode(atomId); n1.setNodeName(atom.getTableNameWithAlias()); nodes.add(n1); for (FormulaAttribute formulaVariable : atom.getAttributes()) { logger.debug("FORMULA ATTRIBUTE PIN: " + formulaVariable.toString()); VMDPinWidget pin = (VMDPinWidget) scene.addPin(atomId, formulaVariable.hashCode() + ""); pin.setPinName(formulaVariable.toString()); } }
Example 4
Source File: LunaticDepScene.java From Llunatic with GNU General Public License v3.0 | 4 votes |
@Override public VMDPinWidget createPin(PinNode pinNode) { VMDPinWidget widget = (VMDPinWidget) addPin(pinNode.getGraphNode(), pinNode); widget.setPinName(pinNode.getDisplayName()); return widget; }