use of java.awt.event.ItemListener in project qi4j-sdk by Qi4j.
the class EntityViewer method initUI.
private void initUI() {
propertiesPanel = new PropertiesPanel();
propertiesPanel.initializeQi4J(qi4jspi);
propertiesAreaPane.add(propertiesPanel, BorderLayout.CENTER);
treePanel = new TreePanel();
treePanel.initializeQi4J(qi4jspi, model);
treePanel.reload();
splitPane.setLeftComponent(treePanel);
splitPane.setDividerLocation(200);
DefaultComboBoxModel entityComboModel = new DefaultComboBoxModel();
entitiesCombo.setModel(entityComboModel);
entitiesCombo.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
entitiesComboItemStateChanged(evt);
}
});
treePanel.getTreeComponent().addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(TreeSelectionEvent evt) {
treePanelValueChanged(evt);
}
});
initEntityCombo(entityComboModel);
}
use of java.awt.event.ItemListener in project jadx by skylot.
the class SearchDialog method makeOptionsCheckBox.
private JCheckBox makeOptionsCheckBox(String name, final SearchOptions opt) {
final JCheckBox chBox = new JCheckBox(name);
chBox.setAlignmentX(LEFT_ALIGNMENT);
chBox.setSelected(options.contains(opt));
chBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (chBox.isSelected()) {
options.add(opt);
} else {
options.remove(opt);
}
performSearch();
}
});
return chBox;
}
use of java.awt.event.ItemListener in project jadx by skylot.
the class JadxSettingsWindow method makeOtherGroup.
private SettingsGroup makeOtherGroup() {
JCheckBox update = new JCheckBox();
update.setSelected(settings.isCheckForUpdates());
update.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setCheckForUpdates(e.getStateChange() == ItemEvent.SELECTED);
}
});
JCheckBox cfg = new JCheckBox();
cfg.setSelected(settings.isCFGOutput());
cfg.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setCfgOutput(e.getStateChange() == ItemEvent.SELECTED);
needReload();
}
});
JCheckBox rawCfg = new JCheckBox();
rawCfg.setSelected(settings.isRawCFGOutput());
rawCfg.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setRawCfgOutput(e.getStateChange() == ItemEvent.SELECTED);
needReload();
}
});
SettingsGroup other = new SettingsGroup(NLS.str("preferences.other"));
other.addRow(NLS.str("preferences.check_for_updates"), update);
other.addRow(NLS.str("preferences.cfg"), cfg);
other.addRow(NLS.str("preferences.raw_cfg"), rawCfg);
return other;
}
use of java.awt.event.ItemListener in project jadx by skylot.
the class JadxSettingsWindow method makeDeobfuscationGroup.
private SettingsGroup makeDeobfuscationGroup() {
JCheckBox deobfOn = new JCheckBox();
deobfOn.setSelected(settings.isDeobfuscationOn());
deobfOn.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setDeobfuscationOn(e.getStateChange() == ItemEvent.SELECTED);
needReload();
}
});
JCheckBox deobfForce = new JCheckBox();
deobfForce.setSelected(settings.isDeobfuscationForceSave());
deobfForce.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setDeobfuscationForceSave(e.getStateChange() == ItemEvent.SELECTED);
needReload();
}
});
final JSpinner minLen = new JSpinner();
minLen.setValue(settings.getDeobfuscationMinLength());
minLen.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
settings.setDeobfuscationMinLength((Integer) minLen.getValue());
needReload();
}
});
final JSpinner maxLen = new JSpinner();
maxLen.setValue(settings.getDeobfuscationMaxLength());
maxLen.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
settings.setDeobfuscationMaxLength((Integer) maxLen.getValue());
needReload();
}
});
JCheckBox deobfSourceAlias = new JCheckBox();
deobfSourceAlias.setSelected(settings.useSourceNameAsClassAlias());
deobfSourceAlias.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setUseSourceNameAsClassAlias(e.getStateChange() == ItemEvent.SELECTED);
needReload();
}
});
SettingsGroup deobfGroup = new SettingsGroup(NLS.str("preferences.deobfuscation"));
deobfGroup.addRow(NLS.str("preferences.deobfuscation_on"), deobfOn);
deobfGroup.addRow(NLS.str("preferences.deobfuscation_force"), deobfForce);
deobfGroup.addRow(NLS.str("preferences.deobfuscation_min_len"), minLen);
deobfGroup.addRow(NLS.str("preferences.deobfuscation_max_len"), maxLen);
deobfGroup.addRow(NLS.str("preferences.deobfuscation_source_alias"), deobfSourceAlias);
deobfGroup.end();
return deobfGroup;
}
use of java.awt.event.ItemListener in project azure-tools-for-java by Microsoft.
the class ApplicationInsightsNewDialog method init.
protected void init() {
super.init();
comboSub.addItemListener(subscriptionListener());
final ButtonGroup resourceGroup = new ButtonGroup();
resourceGroup.add(createNewBtn);
resourceGroup.add(useExistingBtn);
final ItemListener updateListener = new ItemListener() {
public void itemStateChanged(final ItemEvent e) {
final boolean isNewGroup = createNewBtn.isSelected();
textGrp.setEnabled(isNewGroup);
comboGrp.setEnabled(!isNewGroup);
}
};
createNewBtn.addItemListener(updateListener);
useExistingBtn.addItemListener(updateListener);
// comboReg.setRenderer(new ListCellRendererWrapper<Object>() {
//
// @Override
// public void customize(JList jList, Object o, int i, boolean b, boolean b1) {
// if (o != null && (o instanceof Location)) {
// setText(" " + ((Location)o).displayName());
// }
// }
// });
createNewBtn.setSelected(true);
populateValues();
}
Aggregations