本文整理汇总了Java中de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet类的典型用法代码示例。如果您正苦于以下问题:Java GraphicalIFNet类的具体用法?Java GraphicalIFNet怎么用?Java GraphicalIFNet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphicalIFNet类属于de.uni.freiburg.iig.telematik.sepia.graphic包,在下文中一共展示了GraphicalIFNet类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: main
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException {
AristaFlowToPnmlConverter converter = new AristaFlowToPnmlConverter(new File("/tmp/af.template"));
converter.parse();
GraphicalIFNet ifnet = new GraphicalIFNet(new IFNet());
ifnet.setPetriNet(converter.getNet());
IFNetEditorComponent editor = new IFNetEditorComponent(ifnet);
//ifnet, new File("/tmp/test.pnml")
JFrame panel = new JFrame();
panel.setSize(300, 300);
panel.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
panel.add(editor);
panel.setVisible(true);
LayoutAction la = new LayoutAction(editor, "horizontalHierarchical", false);
la.actionPerformed(new ActionEvent(converter, 0, "command"));
}
开发者ID:iig-uni-freiburg,项目名称:SWAT20,代码行数:16,代码来源:AristaFlowToPnmlConverter.java
示例2: doFancyStuff
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
@Override
public void doFancyStuff(ActionEvent e) throws Exception{
String netName = requestNetName("Please choose a name for the new net:", "New Petri-Net");
if (swatNewNetToolbar != null)
swatNewNetToolbar.getToolBar().disposeAllWindows();
if (netName != null) {
// Test new file name
switch (type) {
case NEW_CPN:
GraphicalCPN newCPN = new GraphicalCPN();
newCPN.getPetriNet().setName(netName);
SwatComponents.getInstance().getContainerPetriNets().addComponent(newCPN, true);
//SwatComponents.getInstance().addPetriNet(newCPN);
break;
case NEW_PT:
GraphicalPTNet newPTNet = new GraphicalPTNet();
newPTNet.getPetriNet().setName(netName);
SwatComponents.getInstance().getContainerPetriNets().addComponent(newPTNet, true);
break;
case NEW_IF:
GraphicalIFNet newIFNet = new GraphicalIFNet(new IFNet());
newIFNet.getPetriNet().setName(netName);
SwatComponents.getInstance().getContainerPetriNets().addComponent(newIFNet, true);
break;
case NEW_RTPN:
GraphicalTimedNet newRTPNet = new GraphicalTimedNet(new TimedNet());
newRTPNet.getPetriNet().setName(netName);
SwatComponents.getInstance().getContainerPetriNets().addComponent(newRTPNet,true);
break;
default:
break;
}
}
}
开发者ID:iig-uni-freiburg,项目名称:SWAT20,代码行数:36,代码来源:NewNetAction.java
示例3: getGraphicalPN
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
public AbstractGraphicalPN<?, ?, ?, ?, ?, ?, ?> getGraphicalPN() {
GraphicalIFNet n = new GraphicalIFNet(new IFNet());
n.setPetriNet(getNet());
return n;
}
开发者ID:iig-uni-freiburg,项目名称:SWAT20,代码行数:6,代码来源:AristaFlowToPnmlConverter.java
示例4: SwatIFNetEditorComponent
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
public SwatIFNetEditorComponent(GraphicalIFNet netContainer, boolean askForLayout) {
super(netContainer, askForLayout);
}
开发者ID:iig-uni-freiburg,项目名称:SWAT20,代码行数:4,代码来源:SwatIFNetEditorComponent.java
示例5: SwatIFNetGraph
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
public SwatIFNetGraph(GraphicalIFNet GraphicalIFNet, IFNetProperties IFNetProperties) throws ParameterException {
super(GraphicalIFNet, IFNetProperties);
// TODO Auto-generated constructor stub
}
开发者ID:iig-uni-freiburg,项目名称:SWAT20,代码行数:5,代码来源:SwatIFNetGraph.java
示例6: getSerializer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public static < P extends AbstractPlace<F, S>,
T extends AbstractTransition<F, S>,
F extends AbstractFlowRelation<P, T, S>,
M extends AbstractMarking<S>,
S extends Object,
N extends AbstractPetriNet<P, T, F, M, S>,
G extends AbstractPNGraphics<P, T, F, M, S>>
PNSerializer<P, T, F, M, S, N, G>
getSerializer(AbstractGraphicalPN<P, T, F, M, S, N, G> net, PNSerializationFormat format) throws SerializationException {
// ugly unbounded wildcards as work-around for bug JDK-6932571
Object serializer = null;
Object netObject = net;
switch (format) {
case PNML:
if (netObject instanceof GraphicalIFNet) {
serializer = new PNMLIFNetSerializer((AbstractGraphicalIFNet) net);
}
if (netObject instanceof GraphicalCPN) {
serializer = new PNMLCPNSerializer((AbstractGraphicalCPN) net);
}
if (netObject instanceof GraphicalPTNet) {
serializer = new PNMLPTNetSerializer((AbstractGraphicalPTNet) net);
}
if(netObject instanceof GraphicalTimedNet) {
serializer = new PNMLTimedNetSerializer((AbstractGraphicalTimedNet)net);
}
break;
case PETRIFY:
if (netObject instanceof AbstractGraphicalPTNet)
serializer = new PetrifyPTNetSerializer((AbstractGraphicalPTNet) net);
break;
default:
throw new SerializationException(de.uni.freiburg.iig.telematik.sepia.serialize.SerializationException.ErrorCode.UNSUPPORTED_FORMAT, format);
}
if (serializer != null)
return (PNSerializer<P, T, F, M, S, N, G>) serializer;
else
throw new SerializationException(de.uni.freiburg.iig.telematik.sepia.serialize.SerializationException.ErrorCode.UNSUPPORTED_NET_TYPE, net.getClass());
}
开发者ID:iig-uni-freiburg,项目名称:SEPIA,代码行数:47,代码来源:PNSerialization.java
示例7: getNetContainer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
/**
* Overrides super{@link #getNetContainer()} and returns a {@link GraphicalIFNet}.
*/
@Override
protected GraphicalIFNet getNetContainer() {
return (GraphicalIFNet) super.getNetContainer();
}
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:8,代码来源:IFNetProperties.java
示例8: IFNetEditorComponent
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
public IFNetEditorComponent(GraphicalIFNet netContainer) {
super(netContainer);
}
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:4,代码来源:IFNetEditorComponent.java
示例9: createNetContainer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
@Override
protected GraphicalIFNet createNetContainer() {
return new GraphicalIFNet(new IFNet(), new IFNetGraphics());
}
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:5,代码来源:IFNetEditorComponent.java
示例10: getNetContainer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
@Override
public GraphicalIFNet getNetContainer() {
return (GraphicalIFNet) super.getNetContainer();
}
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:5,代码来源:IFNetEditorComponent.java
示例11: IFNetGraph
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
public IFNetGraph(GraphicalIFNet GraphicalIFNet, IFNetProperties IFNetProperties) throws ParameterException {
super(GraphicalIFNet, IFNetProperties);
}
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:4,代码来源:IFNetGraph.java
示例12: parse
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
@Override
public GraphicalIFNet parse(Document pnmlDocument) throws ParserException {
net = new IFNet();
graphics = new IFNetGraphics();
parseDocument(pnmlDocument);
return new GraphicalIFNet(net, graphics);
}
开发者ID:iig-uni-freiburg,项目名称:SEPIA,代码行数:11,代码来源:PNMLIFNetParser.java
示例13: IFNetProperties
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet; //导入依赖的package包/类
/**
* Creates a new PTProperties object with the given graphical P/T-Net.
* @param GraphicalIFNet The graphical P/T-Net to use.
* @throws ParameterException ParameterException If the given net container is <code>null</code>.
*/
public IFNetProperties(GraphicalIFNet GraphicalIFNet) throws ParameterException{
super(GraphicalIFNet);
}
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:9,代码来源:IFNetProperties.java
注:本文中的de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalIFNet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论