Updated help text display for each of the alias identifier editors.

This commit is contained in:
denny
2016-02-28 10:06:28 -05:00
parent 63cea60c42
commit e31b6adf52
12 changed files with 341 additions and 114 deletions

View File

@@ -17,25 +17,31 @@
******************************************************************************/ ******************************************************************************/
package alias.id.esn; package alias.id.esn;
import java.awt.event.ActionEvent; import java.awt.Color;
import java.awt.event.ActionListener; import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.JTextField; import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
import alias.AliasID; import alias.AliasID;
import alias.ComponentEditor; import alias.ComponentEditor;
import alias.id.talkgroup.TalkgroupIDEditor;
public class ESNEditor extends ComponentEditor<AliasID> public class ESNEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "An Electronic Serial Number (ESN)" private static final String HELP_TEXT =
+ " is a unique radio hardware identifier normally composed of" "<html><h3>Electronic Serial Number (ESN) Example</h3>"
+ " hexadecimal (0-9,A-F) characters. Use an asterisk (*) to wildcard" + "<b>ESN:</b> hexadecimal 0-9, A-F (e.g. <u>ABCD1234</u> )<br>"
+ " individual digits (e.g. ABCD123* or AB**1**4)"; + "<b>Wildcard:</b> use an asterisk (*) to wildcard individual<br>"
+ "digits (e.g. <u>ABCD123*</u> or <u>AB**1**4</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -50,17 +56,27 @@ public class ESNEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "ESN:" ) ); add( new JLabel( "ESN:" ) );
mTextField = new JTextField(); mTextField = new JTextField();
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( ESNEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public Esn getEsn() public Esn getEsn()

View File

@@ -17,11 +17,16 @@
******************************************************************************/ ******************************************************************************/
package alias.id.fleetsync; package alias.id.fleetsync;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.text.MaskFormatter; import javax.swing.text.MaskFormatter;
@@ -33,6 +38,7 @@ import controller.channel.Channel;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
import alias.AliasID; import alias.AliasID;
import alias.ComponentEditor; import alias.ComponentEditor;
import alias.id.esn.ESNEditor;
public class FleetsyncIDEditor extends ComponentEditor<AliasID> public class FleetsyncIDEditor extends ComponentEditor<AliasID>
{ {
@@ -40,9 +46,11 @@ public class FleetsyncIDEditor extends ComponentEditor<AliasID>
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "A Fleetsync identifier is a" private static final String HELP_TEXT = "<html>"
+ " composite decimal [0-9] value formatted as ggg-uuuu where" + "<h3>Fleetsync Identifier Example</h3>"
+ " g=Group and u=Unit."; + "<b>Fleetsync:</b> ggg-uuuu where g=Group and u=Unit (e.g. <u>001-0001</u>)<br>"
+ "<b>Wildcard:</b> use an asterisk (*) for each digit (e.g. <u>001-****</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -57,7 +65,7 @@ public class FleetsyncIDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "Fleetsync ID:" ) ); add( new JLabel( "Fleetsync ID:" ) );
@@ -75,13 +83,23 @@ public class FleetsyncIDEditor extends ComponentEditor<AliasID>
mTextField = new JFormattedTextField( formatter ); mTextField = new JFormattedTextField( formatter );
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( FleetsyncIDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public FleetsyncID getFleetsyncID() public FleetsyncID getFleetsyncID()

View File

@@ -17,13 +17,17 @@
******************************************************************************/ ******************************************************************************/
package alias.id.lojack; package alias.id.lojack;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.text.MaskFormatter; import javax.swing.text.MaskFormatter;
@@ -41,10 +45,19 @@ public class LoJackIDEditor extends ComponentEditor<AliasID>
private JComboBox<LJ1200Message.Function> mFunctionCombo; private JComboBox<LJ1200Message.Function> mFunctionCombo;
private static final String HELP_TEXT = "LoJack function code and five character ID." private static final String HELP_TEXT = "<html>"
+ " The middle character in a reply ID code identifies the entity:" + "<h3>LoJack Example</h3>"
+ " Tower[X,Y] Transponder[0-9,A,C-H,J-N,P-W] Not Used[B,I,O,Z]." + "<b>Function Code:</b> <u>1Y-SITE ID</u><br>"
+ " Use an asterisk (*) to wildcard ID characters (e.g. AB*CD or ***12 or *****)"; + "<b>ID:</b> 5 numbers or characters (e.g. <u>1BN47</u>)<br>"
+ "<br>"
+ "<b>Wildcard:</b> use an asterisk (*) to wildcard ID<br>"
+ "characters (e.g. <u>AB*CD</u> or <u>***12</u> or <u>*****</u>)<br><br>"
+ "The middle character in a reply ID code identifies the<br>"
+ "entity. Valid ID middle characters are:<br>"
+ "<li><b>Tower:</b> X,Y</li>"
+ "<li><b>Transponder:</b> 0-9,A,C-H,J-N,P-W</li>"
+ "<li><b>Not Used:</b> B,I,O,Z</li>"
+ "</html>";
public LoJackIDEditor( AliasID aliasID ) public LoJackIDEditor( AliasID aliasID )
{ {
@@ -57,7 +70,7 @@ public class LoJackIDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][]" ) );
add( new JLabel( "Function:" ) ); add( new JLabel( "Function:" ) );
mFunctionCombo = new JComboBox<LJ1200Message.Function>( Function.values() ); mFunctionCombo = new JComboBox<LJ1200Message.Function>( Function.values() );
@@ -69,6 +82,7 @@ public class LoJackIDEditor extends ComponentEditor<AliasID>
setModified( true ); setModified( true );
} }
} ); } );
mFunctionCombo.setToolTipText( HELP_TEXT );
add( mFunctionCombo, "growx, push" ); add( mFunctionCombo, "growx, push" );
add( new JLabel( "ID:" ) ); add( new JLabel( "ID:" ) );
@@ -87,12 +101,22 @@ public class LoJackIDEditor extends ComponentEditor<AliasID>
mTextField = new JFormattedTextField( formatter ); mTextField = new JFormattedTextField( formatter );
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( LoJackIDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public LoJackFunctionAndID getLoJackID() public LoJackFunctionAndID getLoJackID()

View File

@@ -17,9 +17,14 @@
******************************************************************************/ ******************************************************************************/
package alias.id.mdc; package alias.id.mdc;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.text.MaskFormatter; import javax.swing.text.MaskFormatter;
@@ -31,9 +36,12 @@ public class MDC1200IDEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "An MDC-1200 identifier is a" private static final String HELP_TEXT = "<html>"
+ " four digit [0-9] value. Use an asterisk (*) to wildcard" + "<h3>MDC-1200 Identifier Example</h3>"
+ " individual digits (e.g. 123* or **34)"; + "<b>MDC-1200:</b> four digit [0-9] value (e.g. <u>1234</u>)<br>"
+ "<b>Wildcard:</b> use an asterisk (*) to wildcard individual<br>"
+ "digits (e.g. <u>123*</u> or <u>**34</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -48,7 +56,7 @@ public class MDC1200IDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "MDC-1200 ID:" ) ); add( new JLabel( "MDC-1200 ID:" ) );
@@ -66,12 +74,22 @@ public class MDC1200IDEditor extends ComponentEditor<AliasID>
mTextField = new JFormattedTextField( formatter ); mTextField = new JFormattedTextField( formatter );
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( MDC1200IDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public MDC1200ID getMDC1200ID() public MDC1200ID getMDC1200ID()

View File

@@ -17,11 +17,14 @@
******************************************************************************/ ******************************************************************************/
package alias.id.mobileID; package alias.id.mobileID;
import java.awt.event.ActionEvent; import java.awt.Color;
import java.awt.event.ActionListener; import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.text.MaskFormatter; import javax.swing.text.MaskFormatter;
@@ -29,13 +32,18 @@ import javax.swing.text.MaskFormatter;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
import alias.AliasID; import alias.AliasID;
import alias.ComponentEditor; import alias.ComponentEditor;
import alias.id.esn.ESNEditor;
public class MINEditor extends ComponentEditor<AliasID> public class MINEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "A Passport Mobile Identifier (MIN) is a" private static final String HELP_TEXT = "<html>"
+ " six character hexadecimal value"; + "<h3>Passport Mobile ID (MIN) Example</h3>"
+ "<b>MIN:</b> six character hex value (e.g. <u>AB12CD</u>)<br>"
+ "<b>Wildcard:</b> use an asterisk (*) to wildcard individual<br>"
+ "digits (e.g. <u>AB**CD</u> or <u>AB12**</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -50,7 +58,7 @@ public class MINEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "MIN:" ) ); add( new JLabel( "MIN:" ) );
@@ -68,12 +76,22 @@ public class MINEditor extends ComponentEditor<AliasID>
mTextField = new JFormattedTextField( formatter ); mTextField = new JFormattedTextField( formatter );
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( MINEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public Min getMin() public Min getMin()

View File

@@ -17,9 +17,14 @@
******************************************************************************/ ******************************************************************************/
package alias.id.mpt1327; package alias.id.mpt1327;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.text.MaskFormatter; import javax.swing.text.MaskFormatter;
@@ -31,9 +36,13 @@ public class MPT1327IDEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "An MPT-1327 identifier is a" private static final String HELP_TEXT = "<html>"
+ " composite decimal [0-9] value formatted as ppp-iiii where" + "<h3>MPT-1327 Identifier Example</h3>"
+ " p=Prefix and i=Ident."; + "<b>MPT-1327:</b> decimal (0-9) format ppp-iiii where<br>"
+ "p=Prefix and i=Ident (e.g. <u>123-0001</u>)<br>"
+ "<b>Wildcard:</b> use an asterisk (*) to wildcard individual<br>"
+ "digits (e.g. <u>ABCD123*</u> or <u>AB**1**4</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -48,7 +57,7 @@ public class MPT1327IDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "MPT-1327 ID:" ) ); add( new JLabel( "MPT-1327 ID:" ) );
@@ -66,13 +75,23 @@ public class MPT1327IDEditor extends ComponentEditor<AliasID>
mTextField = new JFormattedTextField( formatter ); mTextField = new JFormattedTextField( formatter );
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( MPT1327IDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public MPT1327ID getMPT1327ID() public MPT1327ID getMPT1327ID()

View File

@@ -17,7 +17,13 @@
******************************************************************************/ ******************************************************************************/
package alias.id.nonrecordable; package alias.id.nonrecordable;
import javax.swing.JTextArea; import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
import alias.AliasID; import alias.AliasID;
@@ -27,9 +33,11 @@ public class NonRecordableEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "This identifies an alias as " private static final String HELP_TEXT = "<html>"
+ "non-recordable. The alias can still be monitored but it will " + "<h3>Non-Recordable Example</h3>"
+ "not be recorded when recording is enabled for the decoding channel."; + "This identifies an alias as non-recordable.<br><br>"
+ "The alias can still be monitored but it will not be recorded<br>"
+ "when recording is enabled for the decoding channel.";
public NonRecordableEditor( AliasID aliasID ) public NonRecordableEditor( AliasID aliasID )
{ {
@@ -42,12 +50,23 @@ public class NonRecordableEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 1", "[]", "[][grow]" ) ); setLayout( new MigLayout( "fill,wrap 1", "[]", "[][]" ) );
JTextArea helpText = new JTextArea( HELP_TEXT ); add( new JLabel( "Non-Recordable" ), "wrap" );
helpText.setLineWrap( true );
helpText.setBackground( getBackground() ); JLabel example = new JLabel( "Example ..." );
add( helpText, "span,grow,push" ); example.setForeground( Color.BLUE.brighter() );
example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( NonRecordableEditor.this,
HELP_TEXT, "Examples", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
@Override @Override

View File

@@ -17,10 +17,15 @@
******************************************************************************/ ******************************************************************************/
package alias.id.priority; package alias.id.priority;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JCheckBox; import javax.swing.JCheckBox;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JSlider; import javax.swing.JSlider;
import javax.swing.JTextArea;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
@@ -34,10 +39,13 @@ public class PriorityEditor extends ComponentEditor<AliasID>
public static final String DO_NOT_MONITOR = "Do Not Monitor"; public static final String DO_NOT_MONITOR = "Do Not Monitor";
private static final String HELP_TEXT = "Priority determines which calls" private static final String HELP_TEXT = "<html>"
+ " have priority for playback over your computer speakers, or designates" + "<h3>Call Priority Example</h3>"
+ " an alias for non-monitoring if you don't want to hear calls" + "Priority determines which calls have priority for playback<br>"
+ " from an alias. Lower values indicate higher priority levels."; + "over your computer speakers, or designates an alias for<br>"
+ "no-monitoring if you don't want to hear calls from an alias.<br><br>"
+ "Lower values indicate higher priority levels."
+ "</html>";
private JCheckBox mDoNotMonitorCheckBox = new JCheckBox( DO_NOT_MONITOR ); private JCheckBox mDoNotMonitorCheckBox = new JCheckBox( DO_NOT_MONITOR );
private JSlider mPrioritySlider; private JSlider mPrioritySlider;
@@ -54,8 +62,9 @@ public class PriorityEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
mDoNotMonitorCheckBox.setToolTipText( HELP_TEXT );
add( mDoNotMonitorCheckBox, "span,align center" ); add( mDoNotMonitorCheckBox, "span,align center" );
mPrioritySlider = new JSlider( JSlider.HORIZONTAL, mPrioritySlider = new JSlider( JSlider.HORIZONTAL,
@@ -76,15 +85,25 @@ public class PriorityEditor extends ComponentEditor<AliasID>
mPrioritySliderLabel.setText( "Priority: " + mPrioritySlider.getValue() ); mPrioritySliderLabel.setText( "Priority: " + mPrioritySlider.getValue() );
} }
} ); } );
mPrioritySlider.setToolTipText( HELP_TEXT );
mPrioritySliderLabel = new JLabel( "Priority: " + mPrioritySlider.getValue() + " " ); mPrioritySliderLabel = new JLabel( "Priority: " + mPrioritySlider.getValue() + " " );
add( mPrioritySliderLabel ); add( mPrioritySliderLabel );
add( mPrioritySlider, "wrap,grow" ); add( mPrioritySlider, "wrap,grow" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( PriorityEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public Priority getPriority() public Priority getPriority()

View File

@@ -17,8 +17,13 @@
******************************************************************************/ ******************************************************************************/
package alias.id.siteID; package alias.id.siteID;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
@@ -29,10 +34,14 @@ public class SiteIDEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "Site number for P25 systems uses" private static final String HELP_TEXT = "<html>"
+ " the format RR-SS, where RR = RF Subsystem and SS = Site Number. " + "<h3>Site ID Example</h3>"
+ " (e.g. RFSS 1 Site 3: 01-03). For other protocols, simply use" + "<b>LTR-Net:</b> decimal (0-9) (e.g. <u>019</u>)<br>"
+ " a decimal value for the site ID"; + "<b>MPT-1327:</b> 5 digits (0-9) (e.g. <u>23619</u>)<br>"
+ "<b>Passport:</b> 3 digits (0-9) (e.g. <u>019</u>)<br>"
+ "<b>P25:</b> hex (0-9, A-F) format RR-SS where RR = RF Subsystem<br>"
+ "and SS = Site Number (e.g. RFSS 1 Site 1F: <u>01-1F</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -47,17 +56,28 @@ public class SiteIDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "Site ID:" ) ); add( new JLabel( "Site ID:" ) );
mTextField = new JTextField(); mTextField = new JTextField();
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( SiteIDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public SiteID getSiteID() public SiteID getSiteID()

View File

@@ -17,9 +17,14 @@
******************************************************************************/ ******************************************************************************/
package alias.id.status; package alias.id.status;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.text.MaskFormatter; import javax.swing.text.MaskFormatter;
@@ -31,10 +36,14 @@ public class StatusIDEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "Status numbers are used in some" private static final String HELP_TEXT = "<html>"
+ " protocols like Fleetsync. The status number is assigned a meaning" + "<h3>Status Example</h3>"
+ " in the radio. You can assign a 3 digit status code (use leading zeros) to an" + "Status numbers are used in some protocols like Fleetsync.<br><br>"
+ " alias where the alias contains the status meaning."; + "The status number is assigned a meaning in the radio. You<br>"
+ "can assign a 3 digit status code (use leading zeros) to an<br>"
+ "alias where the alias contains the status meaning.<br><br>"
+ "<b>Status:</b> <u>001</u> engine start"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -49,7 +58,7 @@ public class StatusIDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "Status:" ) ); add( new JLabel( "Status:" ) );
@@ -67,12 +76,22 @@ public class StatusIDEditor extends ComponentEditor<AliasID>
mTextField = new JFormattedTextField( formatter ); mTextField = new JFormattedTextField( formatter );
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( StatusIDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public StatusID getStatusID() public StatusID getStatusID()

View File

@@ -17,8 +17,13 @@
******************************************************************************/ ******************************************************************************/
package alias.id.talkgroup; package alias.id.talkgroup;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
@@ -29,11 +34,14 @@ public class TalkgroupIDEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "Enter a formatted talkgroup identifier.\n" private static final String HELP_TEXT =
+ "P25: 4 or 6 hex characters (e.g. AB12 or ABC123)\n" "<html><h3>Talkgroup Identifier Examples</h3>"
+ "LTR: A-HH-TTT (A=Area H=Home T=Talkgroup)\n" + "<b>P25:</b> 4 or 6 hex characters (e.g. <u>AB12</u> or <u>ABC123</u>)<br>"
+ "Passport: xxxxx (up to 5-digit number)\n\n" + "<b>LTR:</b> A-HH-TTT where A=Area H=Home T=Talkgroup (<u>0-01-128</u>)<br>"
+ "Wildcard: use an asterisk (*) in place of each talkgroup digit"; + "<b>Passport</b>: 5-digit number (<u>12345</u> or <u>00023</u>)<br>"
+ "<br>"
+ "<b>Wildcard:</b> use an asterisk (*) in place of each talkgroup digit (e.g. <u>0*1*5</u>)"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -48,17 +56,28 @@ public class TalkgroupIDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "Talkgroup:" ) ); add( new JLabel( "Talkgroup:" ) );
mTextField = new JTextField(); mTextField = new JTextField();
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( TalkgroupIDEditor.this,
HELP_TEXT, "Examples", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public TalkgroupID getTalkgroupID() public TalkgroupID getTalkgroupID()

View File

@@ -17,8 +17,13 @@
******************************************************************************/ ******************************************************************************/
package alias.id.uniqueID; package alias.id.uniqueID;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JTextArea; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
@@ -29,8 +34,11 @@ public class UniqueIDEditor extends ComponentEditor<AliasID>
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String HELP_TEXT = "LTR-Net Unique ID (UID) is a system" private static final String HELP_TEXT = "<html>"
+ " identifier assigned to each radio in the range 1 - 2097152"; + "<h3>LTR-Net Unique ID (UID) Example</h3>"
+ "<b>UID:</b> identifier assigned to each radio in<br>"
+ "the range <u>1 - 2097152</u>"
+ "</html>";
private JTextField mTextField; private JTextField mTextField;
@@ -45,17 +53,27 @@ public class UniqueIDEditor extends ComponentEditor<AliasID>
private void initGUI() private void initGUI()
{ {
setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][][grow]" ) ); setLayout( new MigLayout( "fill,wrap 2", "[right][left]", "[][]" ) );
add( new JLabel( "Unique ID:" ) ); add( new JLabel( "Unique ID:" ) );
mTextField = new JTextField(); mTextField = new JTextField();
mTextField.getDocument().addDocumentListener( this ); mTextField.getDocument().addDocumentListener( this );
mTextField.setToolTipText( HELP_TEXT );
add( mTextField, "growx,push" ); add( mTextField, "growx,push" );
JTextArea helpText = new JTextArea( HELP_TEXT ); JLabel example = new JLabel( "Example ..." );
helpText.setLineWrap( true ); example.setForeground( Color.BLUE.brighter() );
helpText.setBackground( getBackground() ); example.setCursor( new Cursor( Cursor.HAND_CURSOR ) );
add( helpText, "span,grow,push" ); example.addMouseListener( new MouseAdapter()
{
@Override
public void mouseClicked( MouseEvent e )
{
JOptionPane.showMessageDialog( UniqueIDEditor.this,
HELP_TEXT, "Example", JOptionPane.INFORMATION_MESSAGE );
}
} );
add( example );
} }
public UniqueID getUniqueID() public UniqueID getUniqueID()