use of javax.swing.event.ChangeListener in project intellij-plugins by JetBrains.
the class JstdServerSettingsTab method listenForChanges.
private void listenForChanges() {
myPortField.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
update();
}
});
myBrowserTimeoutSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
update();
}
});
myRunnerModeComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
update();
}
});
}
use of javax.swing.event.ChangeListener in project JMRI by JMRI.
the class VSDManagerFrame method initGUI.
/**
* Build the GUI components
*/
public void initGUI() {
log.debug("initGUI");
this.setTitle(Bundle.getMessage("VSDManagerFrameTitle"));
this.buildMenu();
this.setLayout(new BoxLayout(this.getContentPane(), BoxLayout.PAGE_AXIS));
decoderPane = new JPanel();
decoderPane.setLayout(new BoxLayout(decoderPane, BoxLayout.PAGE_AXIS));
decoderBlank = VSDControl.generateBlank();
decoderPane.add(decoderBlank);
volumePane = new JPanel();
volumePane.setLayout(new BoxLayout(volumePane, BoxLayout.LINE_AXIS));
JToggleButton muteButton = new JToggleButton(Bundle.getMessage("MuteButtonLabel"));
JButton addButton = new JButton(Bundle.getMessage("AddButtonLabel"));
JButton closeButton = new JButton(Bundle.getMessage("ButtonClose"));
JSlider volume = new JSlider(0, 100);
volume.setMinorTickSpacing(10);
volume.setPaintTicks(true);
volume.setValue(80);
volume.setPreferredSize(new Dimension(200, 20));
volume.setToolTipText(Bundle.getMessage("MgrVolumeToolTip"));
volume.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
volumeChange(e);
}
});
volumePane.add(new JLabel(Bundle.getMessage("VolumePaneLabel")));
volumePane.add(volume);
volumePane.add(muteButton);
muteButton.setToolTipText(Bundle.getMessage("MgrMuteToolTip"));
muteButton.setMnemonic(Mnemonics.get("MuteButton"));
muteButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
muteButtonPressed(e);
}
});
volumePane.add(addButton);
addButton.setToolTipText(Bundle.getMessage("MgrAddButtonToolTip"));
addButton.setMnemonic(Mnemonics.get("AddButton"));
addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
addButtonPressed(e);
}
});
volumePane.add(closeButton);
closeButton.setToolTipText(Bundle.getMessage("MgrCloseButtonToolTip"));
closeButton.setMnemonic(Mnemonics.get("CloseButton"));
closeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
closeButtonPressed(e);
}
});
this.add(decoderPane);
this.add(volumePane);
log.debug("pane size + " + decoderPane.getPreferredSize());
this.pack();
this.setVisible(true);
log.debug("done...");
}
use of javax.swing.event.ChangeListener in project JMRI by JMRI.
the class EcosLocoTableTabAction method createModel.
@Override
protected void createModel() {
dataPanel = new JPanel();
dataTabs = new JTabbedPane();
dataPanel.setLayout(new BorderLayout());
java.util.List<EcosSystemConnectionMemo> list = jmri.InstanceManager.getList(EcosSystemConnectionMemo.class);
if (list != null) {
for (EcosSystemConnectionMemo eMemo : list) {
//We only want to add connections that have an active loco address manager
if (eMemo.getLocoAddressManager() != null) {
TabbedTableItem itemModel = new TabbedTableItem(eMemo.getUserName(), true, eMemo.getLocoAddressManager(), getNewTableAction(eMemo.getUserName(), eMemo));
tabbedTableArray.add(itemModel);
}
}
}
if (tabbedTableArray.size() == 1) {
EcosLocoTableAction table = (EcosLocoTableAction) tabbedTableArray.get(0).getAAClass();
table.addToPanel(this);
dataPanel.add(tabbedTableArray.get(0).getPanel(), BorderLayout.CENTER);
} else {
for (int x = 0; x < tabbedTableArray.size(); x++) {
EcosLocoTableAction table = (EcosLocoTableAction) tabbedTableArray.get(x).getAAClass();
table.addToPanel(this);
dataTabs.addTab(tabbedTableArray.get(x).getItemString(), null, tabbedTableArray.get(x).getPanel(), null);
}
dataTabs.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent evt) {
setMenuBar(f);
}
});
dataPanel.add(dataTabs, BorderLayout.CENTER);
}
init = true;
}
use of javax.swing.event.ChangeListener in project intellij-plugins by JetBrains.
the class JSCreateMethodDialog method createVisibilityPanel.
@Override
protected JPanel createVisibilityPanel() {
JPanel visibilityPanel = super.createVisibilityPanel();
if (myMethod.isConstructor()) {
return visibilityPanel;
}
JPanel panel = new JPanel(new BorderLayout());
panel.add(visibilityPanel, BorderLayout.NORTH);
myStaticCb = new JCheckBox(JSBundle.message("declare.static"));
myStaticCb.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(final ChangeEvent e) {
updateSignature();
}
});
panel.add(myStaticCb, BorderLayout.SOUTH);
return panel;
}
use of javax.swing.event.ChangeListener in project processdash by dtuma.
the class TeamTimePanel method applySubteamFilter.
public void applySubteamFilter(Set<Integer> subteamFilter, String subteamName) {
this.teamMemberFilter = null;
this.subteamFilter = subteamFilter;
this.subteamName = subteamName;
this.teamList.setSubteamFilter(subteamFilter);
rebuildPanelContents();
ChangeEvent evt = new ChangeEvent(this);
for (ChangeListener l : listenerList.getListeners(ChangeListener.class)) l.stateChanged(evt);
}
Aggregations