Skip to content

Commit

Permalink
Avoid type warnings, update version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
ishnid committed Oct 14, 2015
1 parent 7e63e13 commit 7843b21
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions src/is/lill/acre/gui/ProtocolEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class ProtocolEditor extends JFrame {
logger.setLevel( Level.ALL );
}

private static String VERSION = "0.1";
private static String VERSION = "1.11";

public static final int FROM_STATE = 0;
public static final int TO_STATE = 1;
Expand All @@ -69,11 +69,11 @@ public class ProtocolEditor extends JFrame {

private Protocol protocol = new Protocol();

protected DefaultListModel stateListModel = new DefaultListModel();
protected DefaultListModel participantListModel = new DefaultListModel();
protected DefaultListModel<String> stateListModel = new DefaultListModel<String>();
protected DefaultListModel<String> participantListModel = new DefaultListModel<String>();

protected JList stateList = new JList( stateListModel );
private JList participantList = new JList( participantListModel );
protected JList<String> stateList = new JList<String>( stateListModel );
private JList<String> participantList = new JList<String>( participantListModel );

private ITermFormatter formatter = Utilities.getTermFormatter( "acre" );
private List<Transition> transitions = new ArrayList<Transition>();
Expand Down Expand Up @@ -189,7 +189,7 @@ public void mouseClicked( MouseEvent evt ) {

@Override
public void actionPerformed( ActionEvent arg0 ) {
Vector<Object> participants = new Vector<Object>();
Vector<String> participants = new Vector<String>();

for ( int i = 0; i < participantListModel.getSize(); i++ ) {
participants.add( participantListModel.elementAt( i ) );
Expand Down Expand Up @@ -477,15 +477,15 @@ public Protocol getProtocol() {
@SuppressWarnings ( "serial")
class TransitionFrame extends JFrame {

private JComboBox fromStateBox;
private JComboBox toStateBox;
private JComboBox senderBox;
private JComboBox receiverBox;
private JComboBox performativeBox;
private JComboBox<String> fromStateBox;
private JComboBox<String> toStateBox;
private JComboBox<String> senderBox;
private JComboBox<String> receiverBox;
private JComboBox<String> performativeBox;
private JTextField contentField;

private ITermParser parser = Utilities.getTermParser( "acre" );
public TransitionFrame( final Protocol p, Vector<Object> participants, final Transition t ) {
public TransitionFrame( final Protocol p, Vector<String> participants, final Transition t ) {

setSize( 400, 400 );

Expand All @@ -498,20 +498,20 @@ public TransitionFrame( final Protocol p, Vector<Object> participants, final Tra
}

add( new JLabel( "From State:" ) );
fromStateBox = new JComboBox( states );
fromStateBox = new JComboBox<String>( states );
add( fromStateBox );

add( new JLabel( "To State:" ) );
toStateBox = new JComboBox( states );
toStateBox = new JComboBox<String>( states );
add( toStateBox );

add( new JLabel( "Sender:" ) );

senderBox = new JComboBox( participants );
senderBox = new JComboBox<String>( participants );
add( senderBox );
add( new JLabel( "Receiver:" ) );

receiverBox = new JComboBox( participants );
receiverBox = new JComboBox<String>( participants );
add( receiverBox );

// list of performatives
Expand All @@ -528,7 +528,7 @@ public TransitionFrame( final Protocol p, Vector<Object> participants, final Tra

add( new JLabel( "Performative:" ) );

performativeBox = new JComboBox( performatives );
performativeBox = new JComboBox<String>( performatives );
add( performativeBox );

// define the content
Expand Down
2 changes: 1 addition & 1 deletion src/is/lill/acre/gui/swt/RepositoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class RepositoryManager {

Shell shell;

private String VERSION = "1.1";
private String VERSION = "1.11";

private MenuItem newItem;

Expand Down

0 comments on commit 7843b21

Please sign in to comment.