use of jmri.jmrix.jmriclient.JMRIClientSystemConnectionMemo in project JMRI by JMRI.
the class PacketGenActionTest method testMemoCtor.
@Test
public void testMemoCtor() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
PacketGenAction action = new PacketGenAction(new JMRIClientSystemConnectionMemo());
Assert.assertNotNull("exists", action);
}
use of jmri.jmrix.jmriclient.JMRIClientSystemConnectionMemo in project JMRI by JMRI.
the class JMRIClientMonActionTest method testCtor.
@Test
public void testCtor() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
JMRIClientMonAction action = new JMRIClientMonAction(new JMRIClientSystemConnectionMemo());
Assert.assertNotNull("exists", action);
}
use of jmri.jmrix.jmriclient.JMRIClientSystemConnectionMemo in project JMRI by JMRI.
the class ConnectionConfig method checkInitDone.
@Override
protected void checkInitDone() {
super.checkInitDone();
if (adapter.getSystemConnectionMemo() != null) {
transmitPrefixField.setText(((JMRIClientSystemConnectionMemo) adapter.getSystemConnectionMemo()).getTransmitPrefix());
transmitPrefixField.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
((JMRIClientSystemConnectionMemo) adapter.getSystemConnectionMemo()).setTransmitPrefix(transmitPrefixField.getText());
transmitPrefixField.setText(((JMRIClientSystemConnectionMemo) adapter.getSystemConnectionMemo()).getTransmitPrefix());
}
});
transmitPrefixField.addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
((JMRIClientSystemConnectionMemo) adapter.getSystemConnectionMemo()).setTransmitPrefix(transmitPrefixField.getText());
transmitPrefixField.setText(((JMRIClientSystemConnectionMemo) adapter.getSystemConnectionMemo()).getTransmitPrefix());
}
@Override
public void focusGained(FocusEvent e) {
}
});
}
}
Aggregations