java.awt.peer.ButtonPeer Java Examples
The following examples show how to use
java.awt.peer.ButtonPeer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ButtonRepaint.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #2
Source File: RequestOnCompWithNullParent1.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #3
Source File: ButtonRepaint.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #4
Source File: Button.java From Java8CN with Apache License 2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #5
Source File: Button.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #6
Source File: RequestOnCompWithNullParent1.java From hottub with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #7
Source File: ButtonRepaint.java From hottub with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #8
Source File: Button.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #9
Source File: RequestOnCompWithNullParent1.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #10
Source File: ButtonRepaint.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #11
Source File: Button.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #12
Source File: RequestOnCompWithNullParent1.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #13
Source File: Button.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #14
Source File: Button.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #15
Source File: RequestOnCompWithNullParent1.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #16
Source File: ButtonRepaint.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #17
Source File: Button.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #18
Source File: RequestOnCompWithNullParent1.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #19
Source File: ButtonRepaint.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #20
Source File: Button.java From jdk-1.7-annotated with Apache License 2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #21
Source File: Button.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #22
Source File: RequestOnCompWithNullParent1.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #23
Source File: ButtonRepaint.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #24
Source File: Button.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #25
Source File: Button.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #26
Source File: RequestOnCompWithNullParent1.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #27
Source File: ButtonRepaint.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }
Example #28
Source File: Button.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Sets the button's label to be the specified string. * * @param label the new label, or <code>null</code> * if the button has no label. * @see java.awt.Button#getLabel */ public void setLabel(String label) { boolean testvalid = false; synchronized (this) { if (label != this.label && (this.label == null || !this.label.equals(label))) { this.label = label; ButtonPeer peer = (ButtonPeer)this.peer; if (peer != null) { peer.setLabel(label); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid) { invalidateIfValid(); } }
Example #29
Source File: RequestOnCompWithNullParent1.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void instrumentPeer() { origPeer = (ButtonPeer) getPeer(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) { if (method.getName().equals("requestFocus")) { Container parent = getParent(); parent.remove(TestButton.this); System.err.println("parent = " + parent); System.err.println("target = " + TestButton.this); System.err.println("new parent = " + TestButton.this.getParent()); } Object ret = null; try { ret = method.invoke(origPeer, args); } catch (IllegalAccessException iae) { throw new Error("Test error.", iae); } catch (InvocationTargetException ita) { throw new Error("Test error.", ita); } return ret; } }; proxiedPeer = (ButtonPeer) Proxy.newProxyInstance(ButtonPeer.class.getClassLoader(), new Class[] {ButtonPeer.class}, handler); setPeer(proxiedPeer); }
Example #30
Source File: ButtonRepaint.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
void test() { setLabel(""); setLabel(null); setLabel(getLabel()); ((ButtonPeer) getPeer()).setLabel(""); ((ButtonPeer) getPeer()).setLabel(null); ((ButtonPeer) getPeer()).setLabel(getLabel()); setFont(null); setFont(getFont()); getPeer().setFont(getFont()); setBackground(null); setBackground(getBackground()); getPeer().setBackground(getBackground()); setForeground(null); setForeground(getForeground()); getPeer().setForeground(getForeground()); setEnabled(isEnabled()); getPeer().setEnabled(isEnabled()); }