~cpn-gui/tapaal/bug-fixing3

« back to all changes in this revision

Viewing changes to src/pipe/gui/widgets/cpn/ColoredArcDialogPanel.java

  • Committer: Niels Christensen
  • Date: 2019-04-24 09:10:54 UTC
  • Revision ID: nchri13@student.aau.dk-20190424091054-ds0l5e3vqluxlpvg
Made the buttons for interval in the same panel. Made that the interval for arcs connected to shared places work

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
    private void initColoredTimedGuard() {
141
141
        ColorType ct;
142
142
        if (!transportArc) {
143
 
            ct = ((LocalColoredPlace)objectToBeEditedInput.underlyingTimedInputArc().source()).getColorType();
144
 
            colorIntervalPanel = new ColorIntervalAndInvariantEditPanel(context, ct, true, objectToBeEditedInput);
 
143
            if(objectToBeEditedInput.underlyingTimedInputArc().source() instanceof SharedColoredPlace) {
 
144
                ct = ((SharedColoredPlace)objectToBeEditedInput.underlyingTimedInputArc().source()).getColorType();
 
145
                colorIntervalPanel = new ColorIntervalAndInvariantEditPanel(context, ct, true, objectToBeEditedInput);
 
146
            }else {
 
147
                ct = ((LocalColoredPlace) objectToBeEditedInput.underlyingTimedInputArc().source()).getColorType();
 
148
                colorIntervalPanel = new ColorIntervalAndInvariantEditPanel(context, ct, true, objectToBeEditedInput);
 
149
            }
145
150
        }
146
151
        else {
147
 
            ct = ((LocalColoredPlace)objectToBeEditedTransport.underlyingTransportArc().source()).getColorType();
148
 
            colorIntervalPanel = new ColorIntervalAndInvariantEditPanel(context, ct, true, objectToBeEditedTransport);
 
152
            if(objectToBeEditedTransport.underlyingTransportArc().source() instanceof  SharedColoredPlace) {
 
153
                ct = (((SharedColoredPlace) objectToBeEditedTransport.underlyingTransportArc().source()).getColorType());
 
154
                colorIntervalPanel = new ColorIntervalAndInvariantEditPanel(context, ct, true, objectToBeEditedInput);
 
155
            }else {
 
156
                ct = ((LocalColoredPlace) objectToBeEditedTransport.underlyingTransportArc().source()).getColorType();
 
157
                colorIntervalPanel = new ColorIntervalAndInvariantEditPanel(context, ct, true, objectToBeEditedTransport);
 
158
            }
149
159
        }
150
160
 
151
161
        GridBagConstraints gbc = new GridBagConstraints();