use of javax.swing.event.ChangeEvent 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.ChangeEvent in project intellij-plugins by JetBrains.
the class DependenciesConfigurable method rebuildSdksModel.
private void rebuildSdksModel() {
final JdkComboBox.JdkComboBoxItem selectedItem = mySdkCombo.getSelectedItem();
JdkComboBox.NoneJdkComboBoxItem noneSdkItem = new JdkComboBox.NoneJdkComboBoxItem();
myFreeze = true;
try {
mySdkCombo.reloadModel(noneSdkItem, myProject);
} finally {
myFreeze = false;
}
if (selectedItem instanceof JdkComboBox.NoneJdkComboBoxItem) {
mySdkCombo.setSelectedItem(noneSdkItem);
} else {
String selectedSdkName = selectedItem.getSdkName();
if (selectedSdkName != null) {
Sdk sdk = mySkdsModel.findSdk(selectedSdkName);
if (sdk != null) {
mySdkCombo.setSelectedJdk(sdk);
} else {
mySdkCombo.setInvalidJdk(selectedSdkName);
}
} else {
mySdkCombo.setSelectedItem(noneSdkItem);
}
}
if (mySdkCombo.getSelectedJdk() != selectedItem.getJdk()) {
updateOnSelectedSdkChange();
}
mySdkChangeDispatcher.getMulticaster().stateChanged(new ChangeEvent(this));
}
use of javax.swing.event.ChangeEvent 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);
}
use of javax.swing.event.ChangeEvent in project processdash by dtuma.
the class AbstractEVChart method fireStateChanged.
protected void fireStateChanged() {
if (changeListeners != null) {
List<ChangeListener> listeners = new ArrayList<ChangeListener>(changeListeners);
ChangeEvent evt = new ChangeEvent(this);
for (ChangeListener l : listeners) l.stateChanged(evt);
}
}
use of javax.swing.event.ChangeEvent in project processdash by dtuma.
the class TeamMemberColumnManager method createColumns.
/** Create or recreate TeamMemberTimeColumn objects for each team member
*/
private void createColumns() {
List<TeamMemberTimeColumn> obsoletePlanTimeColumns = planTimeColumnList;
List<TeamMemberActualTimeColumn> obsoleteActualTimeColumns = actualTimeColumnList;
ArrayList newColumns = new ArrayList();
planTimeColumnList = new ArrayList<TeamMemberTimeColumn>();
actualTimeColumnList = new ArrayList<TeamMemberActualTimeColumn>();
Iterator teamMembers = teamList.getTeamMembers().iterator();
while (teamMembers.hasNext()) {
// Loop through the list of team members.
TeamMember m = (TeamMember) teamMembers.next();
// try to find a preexisting planned time column for this team member.
TeamMemberTimeColumn planTimeCol = getExistingValidTimeColumn(obsoletePlanTimeColumns, m);
if (planTimeCol == null) {
// create a new column for this team member.
planTimeCol = new TeamMemberTimeColumn(dataModel, m);
newColumns.add(planTimeCol);
}
// add the column to our master list.
planTimeColumnList.add(planTimeCol);
// try to find a preexisting actual time column for this team member.
TeamMemberActualTimeColumn actualTimeCol = getExistingValidTimeColumn(obsoleteActualTimeColumns, m);
if (actualTimeCol == null) {
// create a new column for this team member.
actualTimeCol = new TeamMemberActualTimeColumn(m);
newColumns.add(actualTimeCol);
}
// add the column to our master list.
actualTimeColumnList.add(actualTimeCol);
}
// make the changes to the columns in the data model.
if (!newColumns.isEmpty() || !obsoletePlanTimeColumns.isEmpty() || !obsoleteActualTimeColumns.isEmpty()) {
List obsoleteColumns = new ArrayList();
obsoleteColumns.addAll(obsoletePlanTimeColumns);
obsoleteColumns.addAll(obsoleteActualTimeColumns);
dataModel.addRemoveDataColumns(newColumns, obsoleteColumns);
}
// alert any listeners that have registered interest
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : listeners) l.stateChanged(e);
}
Aggregations