本文整理汇总了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);
}