wip: adds call priority and non-recordable editors to the alias

multi-select editor.  

Changes example hyperlink to 'Help'.
Ensures editor only allows 1 instance of call priority or non-recordable
can be added to any alias.
This commit is contained in:
denny
2016-03-05 08:23:08 -05:00
parent 4ad16296d8
commit 8b11fabf3d
18 changed files with 184 additions and 133 deletions

View File

@@ -47,7 +47,7 @@ public class LoJackIDEditor extends DocumentListenerEditor<AliasID>
private JComboBox<LJ1200Message.Function> mFunctionCombo;
private static final String HELP_TEXT = "<html>"
+ "<h3>LoJack Example</h3>"
+ "<h3>LoJack Function and Identifier</h3>"
+ "<b>Function Code:</b> <u>1Y-SITE ID</u><br>"
+ "<b>ID:</b> 5 numbers or characters (e.g. <u>1BN47</u>)<br>"
+ "<br>"
@@ -103,19 +103,19 @@ public class LoJackIDEditor extends DocumentListenerEditor<AliasID>
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" );
JLabel example = new JLabel( "Example ..." );
example.setForeground( Color.BLUE.brighter() );
example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
example.addMouseListener( new MouseAdapter()
JLabel help = new JLabel( "Help ..." );
help.setForeground( Color.BLUE.brighter() );
help.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
help.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( LoJackIDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
HELP_TEXT, "Help", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
add( help, "align left" );
}
public LoJackFunctionAndID getLoJackID()