axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change
on this file since bd3e314 was
8780cbec,
checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago
|
ABAC sources from Cobham
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[8780cbec] | 1 | package com.algomagic.atn; |
---|
| 2 | |
---|
| 3 | import java.util.*; |
---|
| 4 | |
---|
| 5 | public class PanelUpdate { |
---|
| 6 | BatchGraphUpdate _graphUpdate; |
---|
| 7 | int _tab; |
---|
| 8 | int _side; |
---|
| 9 | Collection _evidence; |
---|
| 10 | boolean _undo; |
---|
| 11 | boolean _raise; |
---|
| 12 | boolean _add; |
---|
| 13 | boolean _hl; |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | public PanelUpdate( BatchGraphUpdate graphUpdate, int side, int tab, Collection evidence, boolean raise, boolean add, boolean hl ) { |
---|
| 17 | _graphUpdate = graphUpdate; |
---|
| 18 | _tab = tab; |
---|
| 19 | _evidence = evidence; |
---|
| 20 | _side = side; |
---|
| 21 | _undo = false; |
---|
| 22 | _raise = raise; |
---|
| 23 | _add = add; |
---|
| 24 | _hl = hl; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | public void apply( VisualizationPanel visPanel ) { |
---|
| 28 | if( _undo ) { |
---|
| 29 | _graphUpdate.undo( ); |
---|
| 30 | if( _evidence != null && _add ) { |
---|
| 31 | visPanel.removeCredentials( _evidence, _tab ); |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | } else { |
---|
| 35 | // if( _raise ) { |
---|
| 36 | // visPanel.setRaised( _tab ); |
---|
| 37 | // } |
---|
| 38 | |
---|
| 39 | visPanel.setRaised( _tab ); |
---|
| 40 | |
---|
| 41 | _graphUpdate.apply( ); |
---|
| 42 | |
---|
| 43 | if( _evidence != null && _hl ) { |
---|
| 44 | visPanel.highlightCredentials( _evidence, _tab ); |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | if( _evidence != null && _add ) { |
---|
| 48 | visPanel.addCredentials( _evidence, _tab ); |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | // if( _evidence != null && _tab >= 0 ) { |
---|
| 53 | // // if( _tab != 0 ) { |
---|
| 54 | // // visPanel.addCredentials( _evidence, _tab ); |
---|
| 55 | // // } |
---|
| 56 | |
---|
| 57 | // visPanel.highlightCredentials( _evidence, _tab ); |
---|
| 58 | // } |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | } |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | public void setUndo( boolean undo ) { |
---|
| 65 | _undo = undo; |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | public int getSide( ) { |
---|
| 69 | return _side; |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | public boolean isEmpty( ) { |
---|
| 74 | return _graphUpdate.isEmpty( ); |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.