Java 8 AdjustmentEvent - 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 AdjustmentEvent class.

This code example shows how to use the following methods:getValue, getSource
 
    } 
    @Override 
    public void adjustmentValueChanged( AdjustmentEvent event ){
       System.out.println( "Adjustment event : "+event ) ;
       if( event.getSource() == _right ){
//           _tree.setOffset( new Point( 10, - event.getValue()  ) ) ; 
            _tree.setLocation( new Point( 10 , - event.getValue() ) ) ;
       } 
    } 
    @Override 
    public void componentMoved( ComponentEvent event ){
       System.out.println( "ComponentEvent : "+event ) ;
    } 
    @Override 
    public void componentHidden( ComponentEvent event ){
       System.out.println( "ComponentEvent : "+event ) ;
    } 
    @Override 
    public void componentShown( ComponentEvent event ){
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getValue, getSource
        } 
    } 
 
    @Override 
    public void adjustmentValueChanged(AdjustmentEvent e) {
        if (e.getSource() == scrollBarAngle) {
            screen.setCrossLineAngle(e.getValue());
        } else if (e.getSource() == scrollBarPosition) {
            screen.setCrossLinePosition(e.getValue());
        } 
 
    } 
 
    private void exportFile(String ext) {
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.addChoosableFileFilter(new FileFilterEx(new String[]{"." + ext}, 
                "(*." + ext + ")" + ext + ORIPA.res.getString("File")));
        if (JFileChooser.APPROVE_OPTION == fileChooser.showSaveDialog(this)) {
            try { 
                String filePath = fileChooser.getSelectedFile().getPath();
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getValue, getSource
        } 
    } 
 
    @Override 
    public void adjustmentValueChanged(AdjustmentEvent e) {
        if (e.getSource() == scrollBarAngle) {
            screen.setCrossLineAngle(e.getValue());
        } else if (e.getSource() == scrollBarPosition) {
            screen.setCrossLinePosition(e.getValue());
        } 
 
    } 
 
    private void exportFile(String ext) {
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.addChoosableFileFilter(new FileFilterEx(new String[]{"." + ext}, 
                "(*." + ext + ")" + ext + ORIPA.res.getString("File")));
        if (JFileChooser.APPROVE_OPTION == fileChooser.showSaveDialog(this)) {
            try { 
                String filePath = fileChooser.getSelectedFile().getPath();
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSource
     * 
     * @param event the change event 
     * @throws IllegalArgumentException if any arg is null 
     */ 
    public void adjustmentValueChanged(AdjustmentEvent event) {
        DVHelper.validateNotNull(event, "event");
        //Obtain the JScrollBar, ZoomPanel, DiagramView and DiagramViewer: 
        JScrollBar bar = (JScrollBar) event.getSource();
        ZoomPanel zoomPanel = (ZoomPanel) bar.getParent();
        /* 
    	 * BugFix: BUGID UML-7148 
    	 * Description: 
    	 * ZoomPanel#getComponent is used to get the contained DiagramView. 
    	 * It should have retrieved the ZoomPane from ZoomPanel, then used 
    	 * ZoomPane#getComponent to get the DiagramView. 
    	 */ 
        // old code 
//        DiagramView view = (DiagramView) zoomPanel.getComponent(0); 
        ZoomPane zoomPane = (ZoomPane) zoomPanel.getViewport().getComponent(0);
        DiagramView view = (DiagramView) zoomPane.getComponent(0);
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSource
	{ 
//		valueWasAdjusting = e.getValueIsAdjusting(); 
		 
		final ActionListener l = al;
		if( l != null ) {
			l.actionPerformed( new ActionEvent( e.getSource(), ActionEvent.ACTION_PERFORMED, null ));
		} 
	} 
} 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSource
		close(); 
		Prefs.saveLocation(LOC_KEY, getLocation());
	} 
 
	public void adjustmentValueChanged(AdjustmentEvent e) {
		if (e.getSource().equals(slider)) {
			rotateTo(slider.getValue() * Math.PI / 180);
			updateTextbox(); 
		} 
	} 
 
	public void itemStateChanged(ItemEvent e) {
		Object source = e.getSource();
		if (source.equals(axis0Choice)) {
			int i = axis0Choice.getSelectedIndex();
			if (i == axis1Choice.getSelectedIndex()) {
				axis0Choice.select(axis0);
				IJ.error("Both axes cannot indicate the same direction"); 
				return; 
			} 
2
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
        // old code 
//        zoomPanel.add(viewer); 
//        zoomPanel.add(bar); 
 
        event = new AdjustmentEvent(bar, 10, 10, 10);
        try { 
            st.adjustmentValueChanged(event);
        } catch (ClassCastException e) {
            // good. 
        } 
    } 
 
    /** 
     * <p> 
     * This is failure test for Method:adjustmentValueChanged(AdjustmentEvent 
     * event).<br> 
     * Failure condition: the arg is null. <br> 
     * Expected: IllegalArgumentException. <br> 
     * </p> 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
        // old code 
//        zoomPanel.add(viewer); 
//        zoomPanel.add(bar); 
 
        AdjustmentEvent event = new AdjustmentEvent(bar, 10, 10, 10);
        try { 
            trigger.adjustmentValueChanged(event);
        } catch (ClassCastException e) {
            // good. 
        } 
    } 
} 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getValue
    public void focusLost(FocusEvent e) {
        this.repaint();
    } 
 
    public void adjustmentValueChanged(AdjustmentEvent e) {
        inicio = e.getValue();
        if (inicio < 0) inicio = 0;
        repaint();
    } 
 
    public void mouseWheelMoved(MouseWheelEvent e) {
        inicio += (e.getUnitsToScroll());
        int n = (int) (buff.limit() / 16);
        n += 4;
        if ((inicio + numberOfVisibleLines) >= n) {
            inicio = n - numberOfVisibleLines;
        } 
        if (inicio < 0) {
            inicio = 0;
        } 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 AdjustmentEvent Methods: