Package org.jitterbit.system

Examples of org.jitterbit.system.Disposable


        Color saved = g.getColor();
        Graphics2D g2 = (Graphics2D) g;
        shape = createOutline();
        g.setColor(new Color(0xf7f7f7));
        g2.fill(shape);
        Disposable borderConfig = borderParams.configure(g2);
        g2.draw(shape);
        borderConfig.dispose();
        g.setColor(saved);
        super.paintComponent(g);
    }
View Full Code Here


            final RenderingHints savedHints = g2.getRenderingHints();
            final Stroke savedStroke = g2.getStroke();
            g2.setColor(color);
            g2.setStroke(stroke);
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            return new Disposable() {

                @Override
                public void dispose() {
                    // No need to restore the Color - the incoming color is not the original color
                    // of the graphics context when paintComponent() is called since paintComponent()
View Full Code Here

            public void valueChanged(Preference<Boolean> pref, Boolean oldValue, Boolean newValue) {
                repaint();
            }
        };
        pref.addListener(listener);
        return new Disposable() {

            @Override
            public void dispose() {
                pref.removeListener(listener);
            }
View Full Code Here

     * @return a <code>Disposable</code> through which this change reaction can be uninstalled
     */
    public final Disposable install(final JTextComponent tc) {
        tc.getDocument().addDocumentListener(changeListener);
        tc.addPropertyChangeListener("document", newDocumentListener);
        return new Disposable() {

            @Override
            public void dispose() {
                uninstall(tc);
            }
View Full Code Here

    public final Disposable install() {
        dispose();
        KeyboardFocusManager keyboard = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        keyboard.addKeyEventDispatcher(this);
        installed = new Disposable() {

            @Override
            public void dispose() {
                KeyboardFocusManager keyboard = KeyboardFocusManager.getCurrentKeyboardFocusManager();
                keyboard.removeKeyEventDispatcher(MagicPhraseDetector.this);
View Full Code Here

     * @return a <code>Disposable</code> that must be disposed when this selector is no longer in
     *         use, to release allocated project listeners
     */
    public Disposable updateAutomatically() {
        if (project == null) {
            return new Disposable() {

                @Override
                public void dispose() {/**/}
            };
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.system.Disposable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.