本文整理汇总了Java中de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet类的典型用法代码示例。如果您正苦于以下问题:Java GraphicalTimedNet类的具体用法?Java GraphicalTimedNet怎么用?Java GraphicalTimedNet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GraphicalTimedNet类属于de.uni.freiburg.iig.telematik.sepia.graphic包,在下文中一共展示了GraphicalTimedNet类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doFancyStuff
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的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;
}
}
}
示例2: parse
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
@Override
public GraphicalTimedNet parse(Document pnmlDocument) throws ParserException {
net=new TimedNet();
graphics = new TimedNetGraphics();
parseDocument(pnmlDocument);
//GraphicalTimedNet result = new (net,graphics);
return new GraphicalTimedNet(net,graphics);
}
示例3: getSerializer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的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());
}
示例4: RTPNProperties
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
public RTPNProperties(GraphicalTimedNet ptNet) {
super(ptNet);
}
示例5: getNetContainer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
/**
* Overrides super{@link #getNetContainer()} and returns a
* {@link GraphicalPTNet}.
*/
@Override
protected GraphicalTimedNet getNetContainer() {
return (GraphicalTimedNet) super.getNetContainer();
}
示例6: RTPNEditorComponent
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
public RTPNEditorComponent(GraphicalTimedNet netContainer) {
super(netContainer);
}
示例7: createGraphComponent
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
@Override
protected RTPNGraphComponent createGraphComponent() {
return new RTPNGraphComponent(new RTPNGraph((GraphicalTimedNet)getNetContainer(), (RTPNProperties) getPNProperties()));
}
示例8: createNetContainer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
@Override
protected GraphicalTimedNet createNetContainer() {
return new GraphicalTimedNet(new TimedNet(), new TimedNetGraphics());
}
示例9: getNetContainer
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
@Override
public GraphicalTimedNet getNetContainer() {
return (GraphicalTimedNet) super.getNetContainer();
}
示例10: RTPNGraph
import de.uni.freiburg.iig.telematik.sepia.graphic.GraphicalTimedNet; //导入依赖的package包/类
public RTPNGraph(GraphicalTimedNet netContainer, RTPNProperties properties) throws ParameterException {
super(netContainer, properties);
}