Java 8 ChangeEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ChangeEvent class.

This code example shows how to use the following methods:
 
	private WizardController wizardController; 
 
	public void fireStateChanged() { 
		if (wizardController != null) { 
			wizardController.stateChanged(new ChangeEvent(this)); 
		} 
	} 
 
	public abstract boolean isReady(); 
 
	public void setWizardController(WizardController wizardController) { 
		this.wizardController = wizardController; 
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		public void componentRemoved(ContainerEvent e) {}
 
		public void componentAdded(ContainerEvent e) {
			if (e.getChild() instanceof WizardPanel) {
				setWizardControllerOnPanel((WizardPanel) e.getChild());
				getWizardController().stateChanged(new ChangeEvent(e.getChild()));
			} 
		} 
 
		public void stateChanged(javax.swing.event.ChangeEvent e) {
			currentIndex = getSelectedIndex();
			getWizardController().stateChanged(e);
		} 
	} 
 
	public WizardTabbedPane(WizardListener listener) {
		this.listener = listener;
		initialize(); 
	} 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		public void componentRemoved(ContainerEvent e) {}
 
		public void componentAdded(ContainerEvent e) {
			if (e.getChild() instanceof WizardPanel) {
				setWizardControllerOnPanel((WizardPanel) e.getChild());
				getWizardController().stateChanged(new ChangeEvent(e.getChild()));
			} 
		} 
	} 
 
	/** 
	 * WizardCardLayout constructor 
	 * 
	 * @param listener WizardListener 
	 */ 
	public WizardCardPanel(WizardListener listener) {
		this.listener = listener;
		initialize(); 
	} 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
		add(lblPrev);
	} 
 
 
	public void stateChanged(ChangeEvent e) {
		ColorSelectionModel csm = (ColorSelectionModel)e.getSource();
		lblCurrColor.setBackground(csm.getSelectedColor());
	} 
	 
	public void setPrevColor(Color pcol){
		lblPrevColor.setBackground(pcol);
	} 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
 
    abstract void newModel(MwDataModel m);
 
    @Override 
    public void stateChanged(final ChangeEvent e) {
        final Object source = e.getSource();
        if (source instanceof MwDataModel) { 
            final MwDataModel m = (MwDataModel) source;
 
            newModel(m);
 
        } 
        // else if (source instanceof JMenu) { 
        // 
        // // save to file , etc ... 
        // } 
    } 
 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
        speedModel = new SpinnerNumberModel(speed, 1, 60, 1);
        speedModel.addChangeListener(new ChangeListener() {
 
            @Override 
            public void stateChanged(ChangeEvent e) {
                setSpeed((Integer) ((SpinnerNumberModel) e.getSource()).getValue());
            } 
        }); 
    } 
 
    public abstract void start(); 
 
    public abstract void stop(); 
 
    public abstract boolean isCining(); 
 
    public int getSpeed() { 
        return (Integer) speedModel.getValue();
    } 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
	} 
 
    @Override 
	public void stateChanged(ChangeEvent e)
	{ 
		if (e.getSource() == eaView.getExperienceMultSlider())
		{ 
			handleMultiplierSlider(); 
		} 
	} 
 
	/** 
	 * Tool menu item 
	 * @param evt 
	 */ 
	public void toolMenuItem(ActionEvent evt)
	{ 
		JTabbedPane tp = GMGenSystemView.getTabPane();
 
		for (int i = 0; i < tp.getTabCount(); i++)
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
	 * Reacts to slider moves. 
	 * @see ChangeListener#stateChanged(ChangeEvent) 
	 */ 
	public void stateChanged(ChangeEvent evt)
	{ 
		Object src = evt.getSource();
		if (src == zSlider || src == tSlider) {
			formatPlane(); 
			OneKnobSlider slider = (OneKnobSlider) src;
			if (!slider.isDragging()) {
				handleSliderReleased(); 
			} 
		} 
	} 
	 
	/** 
	 * Listens to property fired by {@link #zSlider} or {@link #tSlider}. 
	 * @see ChangeListener#stateChanged(ChangeEvent) 
	 */ 
	public void propertyChange(PropertyChangeEvent evt)
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
				fireUpdated(e.getSource());
			} 
		}); 
		maxSpinner.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent e) {
				fireUpdated(e.getSource());
			} 
		}); 
		 
		JLabel minLabel = new JLabel("Min");
		minLabel.setBounds(10,20+offset,40,20);
		add(minLabel);
		JLabel maxLabel = new JLabel("Max");
		maxLabel.setBounds(150,20+offset,40,20);
		add(maxLabel);
		 
		add(minSpinner);
		add(maxSpinner);
		setBorder(BorderFactory.createTitledBorder(name));
		 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getSource
	 * 
	 * @param e 
	 *            the change event. 
	 */ 
	public void stateChanged(final ChangeEvent e) {
		final SpinnerNumberModel model = (SpinnerNumberModel) ((JSpinner) e.getSource()).getModel();
		final int value = model.getNumber().intValue();
		final boolean increase = (value > oldSpinnerValue) ? true : false;
		oldSpinnerValue = value;
		int month = getMonth();
		if (increase) {
			month += 1;
			if (month == 12) {
				month = 0;
				if (yearChooser != null) {
					int year = yearChooser.getYear();
					year += 1;
					yearChooser.setYear(year);
				} 
			} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 ChangeEvent Methods: