本文整理匯總了Java中de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AbstractCPNGraphics類的典型用法代碼示例。如果您正苦於以下問題:Java AbstractCPNGraphics類的具體用法?Java AbstractCPNGraphics怎麽用?Java AbstractCPNGraphics使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AbstractCPNGraphics類屬於de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics包,在下文中一共展示了AbstractCPNGraphics類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateView
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AbstractCPNGraphics; //導入依賴的package包/類
public void updateView() {
panel.removeAll();
panel.add(new JLabel("Token"));
panel.add(new JLabel("Label"));
panel.add(Box.createGlue());
panel.add(new JLabel("Security Level"));
colors = ((AbstractCPNGraphics)graph.getNetContainer().getPetriNetGraphics()).getColors();
graph = (PNGraph) editor.getGraphComponent().getGraph();
if (getTokenColors().contains("black"))
colors.put("black", Color.BLACK);
if(graph instanceof IFNetGraph){
//TODO: Adapt to new ACStructure
// if (((IFNetGraph)graph).getCurrentAnalysisContext() != null) {
// labeling = ((IFNetGraph)graph).getCurrentAnalysisContext().getLabeling();
// }
}
int size = 0;
Set<String> colorsTemp = ((AbstractCPN)graph.getNetContainer().getPetriNet()).getTokenColors();
for (String colorName : colors.keySet()) {
addRow(colorName);
size++;
}
SpringUtilities.makeCompactGrid(panel, size + 1, 4, 6, 6, 6, 6);
add(panel);
setVisible(false);
setVisible(true);
}
示例2: setUpGui
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AbstractCPNGraphics; //導入依賴的package包/類
public void setUpGui() {
mapColorsForToolBar = ((AbstractCPNGraphics) this.editor.getNetContainer().getPetriNetGraphics()).getColors();
pnlTokenColors.removeAll();
createAddBtn();
pnlTokenColors.add(new JLabel("Color"));
// Undelying columns contain more elements
pnlTokenColors.add(Box.createGlue());
pnlTokenColors.add(Box.createGlue());
pnlTokenColors.add(Box.createGlue());
pnlTokenColors.add(Box.createGlue());
if (((AbstractCPN) this.editor.getNetContainer().getPetriNet()).getTokenColors().contains("black"))
mapColorsForToolBar.put("black", Color.BLACK);
addRow("black");
Map<String, Color> sortedMap = new TreeMap<String, Color>(mapColorsForToolBar);
for (String color : sortedMap.keySet()) {
if (!color.equals("black"))
addRow(color);
}
makeCompactGrid();
add(pnlTokenColors);
}
示例3: updateTokenConfigurerView
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AbstractCPNGraphics; //導入依賴的package包/類
public void updateTokenConfigurerView() {
if (getNetContainer() instanceof AbstractGraphicalCPN)
colors = ((AbstractCPNGraphics) getNetContainer().getPetriNetGraphics()).getColors();
if (getNetContainer() instanceof AbstractGraphicalPTNet) {
colors = new HashMap<String, Color>();
colors.put("black", Color.BLACK);
}
mainPanel().removeAll();
if (shouldAddAddBtn())
createAddBtn();
else
mainPanel().add(Box.createHorizontalStrut(25));
mainPanel().add(new JLabel(getCellSpecificHeadline()));
// Nötig?
mainPanel().add(Box.createGlue());
mainPanel().add(Box.createGlue());
if (getCellSpecific2ndHeadline() != null)
mainPanel().add(new JLabel(getCellSpecific2ndHeadline()));
else
mainPanel().add(Box.createGlue());
mainPanel().add(Box.createGlue());
int size = 0;
if (getTokenColors().contains("black")) {
colors.put("black", Color.BLACK);
if(shouldAddRow("black")){
addRow("black");
size++;}
}
TreeMap<String, Color> sortedColorMap = new TreeMap<String, Color>(colors);
for (String color : sortedColorMap.keySet()) {
if (shouldAddRow(color)) {
if (!color.equals("black")) {
addRow(color);
size++;
}
}
}
mainPanel().add(Box.createGlue());
mainPanel().add(Box.createGlue());
mainPanel().add(Box.createGlue());
mainPanel().add(Box.createGlue());
createCellSpecificComponents();
mainPanel().add(Box.createGlue());
SpringUtilities.makeCompactGrid(mainPanel(), mainPanel().getComponentCount() / 6, 6, 6, 6, 6, 6);
pack();
}
示例4: createTokenColorMap
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AbstractCPNGraphics; //導入依賴的package包/類
private void createTokenColorMap() {
mapColorsForToolBar = ((AbstractCPNGraphics) this.editor.getNetContainer().getPetriNetGraphics()).getColors();
mapColorsForToolBar.put("black", Color.BLACK);
}