|
From: <ls...@us...> - 2012-09-23 09:24:21
|
Revision: 5931
http://jnode.svn.sourceforge.net/jnode/?rev=5931&view=rev
Author: lsantha
Date: 2012-09-23 09:24:10 +0000 (Sun, 23 Sep 2012)
Log Message:
-----------
Integrating OpenJDK 6 build 26.
Modified Paths:
--------------
classlib6/core/src/openjdk/com/com/sun/beans/finder/ClassFinder.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/toa/TOAFactory.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orb/ParserTable.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/protocol/LocalClientRequestDispatcherBase.java
classlib6/core/src/openjdk/com/com/sun/corba/se/impl/util/RepositoryId.java
classlib6/core/src/openjdk/com/com/sun/corba/se/spi/logging/CORBALogDomains.java
classlib6/core/src/openjdk/com/com/sun/java/util/jar/pack/Driver.java
classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
classlib6/core/src/openjdk/corba/sun/rmi/rmic/iiop/IDLNames.java
classlib6/core/src/openjdk/corba/sun/rmi/rmic/iiop/StubGenerator.java
classlib6/core/src/openjdk/java/java/awt/AWTEvent.java
classlib6/core/src/openjdk/java/java/awt/CheckboxMenuItem.java
classlib6/core/src/openjdk/java/java/awt/Component.java
classlib6/core/src/openjdk/java/java/awt/DefaultKeyboardFocusManager.java
classlib6/core/src/openjdk/java/java/awt/EventQueue.java
classlib6/core/src/openjdk/java/java/awt/KeyboardFocusManager.java
classlib6/core/src/openjdk/java/java/awt/Menu.java
classlib6/core/src/openjdk/java/java/awt/MenuBar.java
classlib6/core/src/openjdk/java/java/awt/MenuComponent.java
classlib6/core/src/openjdk/java/java/awt/MenuItem.java
classlib6/core/src/openjdk/java/java/awt/PopupMenu.java
classlib6/core/src/openjdk/java/java/awt/ScrollPaneAdjustable.java
classlib6/core/src/openjdk/java/java/awt/Window.java
classlib6/core/src/openjdk/java/java/beans/Introspector.java
classlib6/core/src/openjdk/java/java/beans/PropertyEditorManager.java
classlib6/core/src/openjdk/java/java/io/File.java
classlib6/core/src/openjdk/java/java/io/FileSystem.java
classlib6/core/src/openjdk/java/java/net/NetworkInterface.java
classlib6/core/src/openjdk/java/java/util/UUID.java
classlib6/core/src/openjdk/javax/javax/crypto/CipherSpi.java
classlib6/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageInputStream.java
classlib6/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageOutputStream.java
classlib6/core/src/openjdk/javax/javax/management/loading/MLet.java
classlib6/core/src/openjdk/javax/javax/swing/ClientPropertyKey.java
classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthButtonUI.java
classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthLabelUI.java
classlib6/core/src/openjdk/javax/javax/swing/plaf/synth/SynthLookAndFeel.java
classlib6/core/src/openjdk/sun/sun/awt/AWTAccessor.java
classlib6/core/src/openjdk/sun/sun/awt/AppContext.java
classlib6/core/src/openjdk/sun/sun/awt/KeyboardFocusManagerPeerImpl.java
classlib6/core/src/openjdk/sun/sun/awt/SunToolkit.java
classlib6/core/src/openjdk/sun/sun/misc/IOUtils.java
classlib6/core/src/openjdk/sun/sun/misc/SharedSecrets.java
classlib6/core/src/openjdk/sun/sun/net/www/protocol/jar/URLJarFile.java
classlib6/core/src/openjdk/sun/sun/print/PSPrinterJob.java
classlib6/core/src/openjdk/sun/sun/rmi/server/Activation.java
classlib6/core/src/openjdk/sun/sun/security/ssl/AppOutputStream.java
classlib6/core/src/openjdk/sun/sun/security/ssl/EngineOutputRecord.java
classlib6/core/src/openjdk/sun/sun/security/ssl/OutputRecord.java
classlib6/core/src/openjdk/sun/sun/security/ssl/SSLSocketImpl.java
classlib6/core/src/openjdk/sun/sun/security/x509/CRLExtensions.java
classlib6/core/src/openjdk/sun/sun/security/x509/CertificateExtensions.java
classlib6/core/src/openjdk/sun/sun/security/x509/X509CRLEntryImpl.java
classlib6/core/src/openjdk/sun/sun/security/x509/X509CRLImpl.java
classlib6/core/src/openjdk/sun/sun/security/x509/X509CertImpl.java
classlib6/core/src/openjdk/sun/sun/tools/jar/Main.java
classlib6/core/src/openjdk/sun/sun/tools/native2ascii/Main.java
classlib6/core/src/openjdk/svm/java/io/UnixFileSystem.java
Added Paths:
-----------
classlib6/core/src/openjdk/com/com/sun/beans/editors/
classlib6/core/src/openjdk/com/com/sun/beans/editors/BooleanEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/ByteEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/ColorEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/DoubleEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/EnumEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/FloatEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/FontEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/IntegerEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/LongEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/NumberEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/ShortEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/editors/StringEditor.java
classlib6/core/src/openjdk/com/com/sun/beans/infos/
classlib6/core/src/openjdk/com/com/sun/beans/infos/ComponentBeanInfo.java
classlib6/core/src/openjdk/sun/sun/misc/JavaIOFileAccess.java
Removed Paths:
-------------
classlib6/core/src/openjdk/sun/sun/beans/
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/BooleanEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/BooleanEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/BooleanEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "boolean" type.
+ */
+
+import java.beans.*;
+
+public class BooleanEditor extends PropertyEditorSupport {
+
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value.toString()
+ : "null";
+ }
+
+ public String getAsText() {
+ Object value = getValue();
+ return (value instanceof Boolean)
+ ? getValidName((Boolean) value)
+ : "null";
+ }
+
+ public void setAsText(String text) throws java.lang.IllegalArgumentException {
+ if (text == null) {
+ setValue(null);
+ } else if (isValidName(true, text)) {
+ setValue(Boolean.TRUE);
+ } else if (isValidName(false, text)) {
+ setValue(Boolean.FALSE);
+ } else {
+ throw new java.lang.IllegalArgumentException(text);
+ }
+ }
+
+ public String[] getTags() {
+ return new String[] {getValidName(true), getValidName(false)};
+ }
+
+ // the following method should be localized (4890258)
+
+ private String getValidName(boolean value) {
+ return value ? "True" : "False";
+ }
+
+ private boolean isValidName(boolean value, String name) {
+ return getValidName(value).equalsIgnoreCase(name);
+ }
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/ByteEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/ByteEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/ByteEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "byte" type.
+ *
+ */
+
+import java.beans.*;
+
+public class ByteEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? "((byte)" + value + ")"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Byte.decode(text));
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/ColorEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/ColorEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/ColorEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,212 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+import java.awt.*;
+import java.beans.*;
+
+public class ColorEditor extends Panel implements PropertyEditor {
+ public ColorEditor() {
+ setLayout(null);
+
+ ourWidth = hPad;
+
+ // Create a sample color block bordered in black
+ Panel p = new Panel();
+ p.setLayout(null);
+ p.setBackground(Color.black);
+ sample = new Canvas();
+ p.add(sample);
+ sample.reshape(2, 2, sampleWidth, sampleHeight);
+ add(p);
+ p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4);
+ ourWidth += sampleWidth + 4 + hPad;
+
+ text = new TextField("", 14);
+ add(text);
+ text.reshape(ourWidth,0,100,30);
+ ourWidth += 100 + hPad;
+
+ choser = new Choice();
+ int active = 0;
+ for (int i = 0; i < colorNames.length; i++) {
+ choser.addItem(colorNames[i]);
+ }
+ add(choser);
+ choser.reshape(ourWidth,0,100,30);
+ ourWidth += 100 + hPad;
+
+ resize(ourWidth,40);
+ }
+
+ public void setValue(Object o) {
+ Color c = (Color)o;
+ changeColor(c);
+ }
+
+ public Dimension preferredSize() {
+ return new Dimension(ourWidth, 40);
+ }
+
+ public boolean keyUp(Event e, int key) {
+ if (e.target == text) {
+ try {
+ setAsText(text.getText());
+ } catch (IllegalArgumentException ex) {
+ // Quietly ignore.
+ }
+ }
+ return (false);
+ }
+
+ public void setAsText(String s) throws java.lang.IllegalArgumentException {
+ if (s == null) {
+ changeColor(null);
+ return;
+ }
+ int c1 = s.indexOf(',');
+ int c2 = s.indexOf(',', c1+1);
+ if (c1 < 0 || c2 < 0) {
+ // Invalid string.
+ throw new IllegalArgumentException(s);
+ }
+ try {
+ int r = Integer.parseInt(s.substring(0,c1));
+ int g = Integer.parseInt(s.substring(c1+1, c2));
+ int b = Integer.parseInt(s.substring(c2+1));
+ Color c = new Color(r,g,b);
+ changeColor(c);
+ } catch (Exception ex) {
+ throw new IllegalArgumentException(s);
+ }
+
+ }
+
+ public boolean action(Event e, Object arg) {
+ if (e.target == choser) {
+ changeColor(colors[choser.getSelectedIndex()]);
+ }
+ return false;
+ }
+
+ public String getJavaInitializationString() {
+ return (this.color != null)
+ ? "new java.awt.Color(" + this.color.getRGB() + ",true)"
+ : "null";
+ }
+
+
+ private void changeColor(Color c) {
+
+ if (c == null) {
+ this.color = null;
+ this.text.setText("");
+ return;
+ }
+
+ color = c;
+
+ text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
+
+ int active = 0;
+ for (int i = 0; i < colorNames.length; i++) {
+ if (color.equals(colors[i])) {
+ active = i;
+ }
+ }
+ choser.select(active);
+
+ sample.setBackground(color);
+ sample.repaint();
+
+ support.firePropertyChange("", null, null);
+ }
+
+ public Object getValue() {
+ return color;
+ }
+
+ public boolean isPaintable() {
+ return true;
+ }
+
+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+ Color oldColor = gfx.getColor();
+ gfx.setColor(Color.black);
+ gfx.drawRect(box.x, box.y, box.width-3, box.height-3);
+ gfx.setColor(color);
+ gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4);
+ gfx.setColor(oldColor);
+ }
+
+ public String getAsText() {
+ return (this.color != null)
+ ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
+ : "null";
+ }
+
+ public String[] getTags() {
+ return null;
+ }
+
+ public java.awt.Component getCustomEditor() {
+ return this;
+ }
+
+ public boolean supportsCustomEditor() {
+ return true;
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ support.addPropertyChangeListener(l);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l) {
+ support.removePropertyChangeListener(l);
+ }
+
+
+ private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
+ "black", "red", "pink", "orange",
+ "yellow", "green", "magenta", "cyan",
+ "blue"};
+ private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
+ Color.black, Color.red, Color.pink, Color.orange,
+ Color.yellow, Color.green, Color.magenta, Color.cyan,
+ Color.blue};
+
+ private Canvas sample;
+ private int sampleHeight = 20;
+ private int sampleWidth = 40;
+ private int hPad = 5;
+ private int ourWidth;
+
+ private Color color;
+ private TextField text;
+ private Choice choser;
+
+ private PropertyChangeSupport support = new PropertyChangeSupport(this);
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/DoubleEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/DoubleEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/DoubleEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "double" type.
+ *
+ */
+
+import java.beans.*;
+
+public class DoubleEditor extends NumberEditor {
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Double.valueOf(text));
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/EnumEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/EnumEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/EnumEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.beans.editors;
+
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyEditor;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Property editor for java.lang.Enum subclasses.
+ *
+ * @see PropertyEditor
+ *
+ * @since 1.7
+ *
+ * @author Sergey A. Malenkov
+ */
+public final class EnumEditor implements PropertyEditor {
+ private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
+
+ private final Class type;
+ private final String[] tags;
+
+ private Object value;
+
+ public EnumEditor( Class type ) {
+ Object[] values = type.getEnumConstants();
+ if ( values == null ) {
+ throw new IllegalArgumentException( "Unsupported " + type );
+ }
+ this.type = type;
+ this.tags = new String[values.length];
+ for ( int i = 0; i < values.length; i++ ) {
+ this.tags[i] = ( ( Enum )values[i] ).name();
+ }
+ }
+
+ public Object getValue() {
+ return this.value;
+ }
+
+ public void setValue( Object value ) {
+ if ( ( value != null ) && !this.type.isInstance( value ) ) {
+ throw new IllegalArgumentException( "Unsupported value: " + value );
+ }
+ Object oldValue;
+ PropertyChangeListener[] listeners;
+ synchronized ( this.listeners ) {
+ oldValue = this.value;
+ this.value = value;
+
+ if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) {
+ return; // do not fire event if value is not changed
+ }
+ int size = this.listeners.size();
+ if ( size == 0 ) {
+ return; // do not fire event if there are no any listener
+ }
+ listeners = this.listeners.toArray( new PropertyChangeListener[size] );
+ }
+ PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value );
+ for ( PropertyChangeListener listener : listeners ) {
+ listener.propertyChange( event );
+ }
+ }
+
+ public String getAsText() {
+ return ( this.value != null )
+ ? ( ( Enum )this.value ).name()
+ : "null";
+ }
+
+ public void setAsText( String text ) {
+ setValue( ( text != null )
+ ? Enum.valueOf( this.type, text )
+ : null );
+ }
+
+ public String[] getTags() {
+ return this.tags.clone();
+ }
+
+ public String getJavaInitializationString() {
+ return ( this.value != null )
+ ? this.type.getName() + '.' + ( ( Enum )this.value ).name()
+ : "null";
+ }
+
+ public boolean isPaintable() {
+ return false;
+ }
+
+ public void paintValue( Graphics gfx, Rectangle box ) {
+ }
+
+ public boolean supportsCustomEditor() {
+ return false;
+ }
+
+ public Component getCustomEditor() {
+ return null;
+ }
+
+ public void addPropertyChangeListener( PropertyChangeListener listener ) {
+ synchronized ( this.listeners ) {
+ this.listeners.add( listener );
+ }
+ }
+
+ public void removePropertyChangeListener( PropertyChangeListener listener ) {
+ synchronized ( this.listeners ) {
+ this.listeners.remove( listener );
+ }
+ }
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/FloatEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/FloatEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/FloatEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "float" type.
+ *
+ */
+
+import java.beans.*;
+
+public class FloatEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value + "F"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Float.valueOf(text));
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/FontEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/FontEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/FontEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+import java.awt.*;
+import java.beans.*;
+
+public class FontEditor extends Panel implements java.beans.PropertyEditor {
+
+ public FontEditor() {
+ setLayout(null);
+
+ toolkit = Toolkit.getDefaultToolkit();
+ fonts = toolkit.getFontList();
+
+ familyChoser = new Choice();
+ for (int i = 0; i < fonts.length; i++) {
+ familyChoser.addItem(fonts[i]);
+ }
+ add(familyChoser);
+ familyChoser.reshape(20, 5, 100, 30);
+
+ styleChoser = new Choice();
+ for (int i = 0; i < styleNames.length; i++) {
+ styleChoser.addItem(styleNames[i]);
+ }
+ add(styleChoser);
+ styleChoser.reshape(145, 5, 70, 30);
+
+ sizeChoser = new Choice();
+ for (int i = 0; i < pointSizes.length; i++) {
+ sizeChoser.addItem("" + pointSizes[i]);
+ }
+ add(sizeChoser);
+ sizeChoser.reshape(220, 5, 70, 30);
+
+ resize(300,40);
+ }
+
+
+ public Dimension preferredSize() {
+ return new Dimension(300, 40);
+ }
+
+ public void setValue(Object o) {
+ font = (Font) o;
+ if (this.font == null)
+ return;
+
+ changeFont(font);
+ // Update the current GUI choices.
+ for (int i = 0; i < fonts.length; i++) {
+ if (fonts[i].equals(font.getFamily())) {
+ familyChoser.select(i);
+ break;
+ }
+ }
+ for (int i = 0; i < styleNames.length; i++) {
+ if (font.getStyle() == styles[i]) {
+ styleChoser.select(i);
+ break;
+ }
+ }
+ for (int i = 0; i < pointSizes.length; i++) {
+ if (font.getSize() <= pointSizes[i]) {
+ sizeChoser.select(i);
+ break;
+ }
+ }
+ }
+
+ private void changeFont(Font f) {
+ font = f;
+ if (sample != null) {
+ remove(sample);
+ }
+ sample = new Label(sampleText);
+ sample.setFont(font);
+ add(sample);
+ Component p = getParent();
+ if (p != null) {
+ p.invalidate();
+ p.layout();
+ }
+ invalidate();
+ layout();
+ repaint();
+ support.firePropertyChange("", null, null);
+ }
+
+ public Object getValue() {
+ return (font);
+ }
+
+ public String getJavaInitializationString() {
+ if (this.font == null)
+ return "null";
+
+ return "new java.awt.Font(\"" + font.getName() + "\", " +
+ font.getStyle() + ", " + font.getSize() + ")";
+ }
+
+ public boolean action(Event e, Object arg) {
+ String family = familyChoser.getSelectedItem();
+ int style = styles[styleChoser.getSelectedIndex()];
+ int size = pointSizes[sizeChoser.getSelectedIndex()];
+ try {
+ Font f = new Font(family, style, size);
+ changeFont(f);
+ } catch (Exception ex) {
+ System.err.println("Couldn't create font " + family + "-" +
+ styleNames[style] + "-" + size);
+ }
+ return (false);
+ }
+
+
+ public boolean isPaintable() {
+ return true;
+ }
+
+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+ // Silent noop.
+ Font oldFont = gfx.getFont();
+ gfx.setFont(font);
+ FontMetrics fm = gfx.getFontMetrics();
+ int vpad = (box.height - fm.getAscent())/2;
+ gfx.drawString(sampleText, 0, box.height-vpad);
+ gfx.setFont(oldFont);
+ }
+
+ public String getAsText() {
+ if (this.font == null) {
+ return "null";
+ }
+ StringBuilder sb = new StringBuilder();
+ sb.append(this.font.getName());
+ sb.append(' ');
+
+ boolean b = this.font.isBold();
+ if (b) {
+ sb.append("BOLD");
+ }
+ boolean i = this.font.isItalic();
+ if (i) {
+ sb.append("ITALIC");
+ }
+ if (b || i) {
+ sb.append(' ');
+ }
+ sb.append(this.font.getSize());
+ return sb.toString();
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Font.decode(text));
+ }
+
+ public String[] getTags() {
+ return null;
+ }
+
+ public java.awt.Component getCustomEditor() {
+ return this;
+ }
+
+ public boolean supportsCustomEditor() {
+ return true;
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ support.addPropertyChangeListener(l);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l) {
+ support.removePropertyChangeListener(l);
+ }
+
+ private Font font;
+ private Toolkit toolkit;
+ private String sampleText = "Abcde...";
+
+ private Label sample;
+ private Choice familyChoser;
+ private Choice styleChoser;
+ private Choice sizeChoser;
+
+ private String fonts[];
+ private String[] styleNames = { "plain", "bold", "italic" };
+ private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC };
+ private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 };
+
+ private PropertyChangeSupport support = new PropertyChangeSupport(this);
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/IntegerEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/IntegerEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/IntegerEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "int" type.
+ *
+ */
+
+import java.beans.*;
+
+public class IntegerEditor extends NumberEditor {
+
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Integer.decode(text));
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/LongEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/LongEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/LongEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "long" type.
+ *
+ */
+
+import java.beans.*;
+
+public class LongEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value + "L"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Long.decode(text));
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/NumberEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/NumberEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/NumberEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.editors;
+
+/**
+ * Abstract Property editor for a java builtin number types.
+ *
+ */
+
+import java.beans.*;
+
+abstract public class NumberEditor extends PropertyEditorSupport {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value.toString()
+ : "null";
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/ShortEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/ShortEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/ShortEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package com.sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "short" type.
+ *
+ */
+
+import java.beans.*;
+
+public class ShortEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? "((short)" + value + ")"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Short.decode(text));
+ }
+
+}
Added: classlib6/core/src/openjdk/com/com/sun/beans/editors/StringEditor.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/editors/StringEditor.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/editors/StringEditor.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package com.sun.beans.editors;
+
+import java.beans.*;
+
+public class StringEditor extends PropertyEditorSupport {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ if (value == null)
+ return "null";
+
+ String str = value.toString();
+ int length = str.length();
+ StringBuilder sb = new StringBuilder(length + 2);
+ sb.append('"');
+ for (int i = 0; i < length; i++) {
+ char ch = str.charAt(i);
+ switch (ch) {
+ case '\b': sb.append("\\b"); break;
+ case '\t': sb.append("\\t"); break;
+ case '\n': sb.append("\\n"); break;
+ case '\f': sb.append("\\f"); break;
+ case '\r': sb.append("\\r"); break;
+ case '\"': sb.append("\\\""); break;
+ case '\\': sb.append("\\\\"); break;
+ default:
+ if ((ch < ' ') || (ch > '~')) {
+ sb.append("\\u");
+ String hex = Integer.toHexString((int) ch);
+ for (int len = hex.length(); len < 4; len++) {
+ sb.append('0');
+ }
+ sb.append(hex);
+ } else {
+ sb.append(ch);
+ }
+ break;
+ }
+ }
+ sb.append('"');
+ return sb.toString();
+ }
+
+ public void setAsText(String text) {
+ setValue(text);
+ }
+
+}
Modified: classlib6/core/src/openjdk/com/com/sun/beans/finder/ClassFinder.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/finder/ClassFinder.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/beans/finder/ClassFinder.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
*/
package com.sun.beans.finder;
+import static sun.reflect.misc.ReflectUtil.checkPackageAccess;
+
/**
* This is utility class that provides <code>static</code> methods
* to find a class with the specified name using the specified class loader.
@@ -53,6 +55,7 @@
* @see Thread#getContextClassLoader()
*/
public static Class findClass( String name ) throws ClassNotFoundException {
+ checkPackageAccess(name);
try {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if ( loader == null ) {
@@ -93,6 +96,7 @@
* @see Class#forName(String,boolean,ClassLoader)
*/
public static Class findClass( String name, ClassLoader loader ) throws ClassNotFoundException {
+ checkPackageAccess(name);
if ( loader != null ) {
try {
return Class.forName( name, false, loader );
Added: classlib6/core/src/openjdk/com/com/sun/beans/infos/ComponentBeanInfo.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/beans/infos/ComponentBeanInfo.java (rev 0)
+++ classlib6/core/src/openjdk/com/com/sun/beans/infos/ComponentBeanInfo.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.beans.infos;
+
+import java.beans.*;
+
+/**
+ * BeanInfo descriptor for a standard AWT component.
+ */
+
+public class ComponentBeanInfo extends SimpleBeanInfo {
+ private static final Class beanClass = java.awt.Component.class;
+
+ public PropertyDescriptor[] getPropertyDescriptors() {
+ try {
+ PropertyDescriptor
+ name = new PropertyDescriptor("name", beanClass),
+ background = new PropertyDescriptor("background", beanClass),
+ foreground = new PropertyDescriptor("foreground", beanClass),
+ font = new PropertyDescriptor("font", beanClass),
+ enabled = new PropertyDescriptor("enabled", beanClass),
+ visible = new PropertyDescriptor("visible", beanClass),
+ focusable = new PropertyDescriptor("focusable", beanClass);
+
+ enabled.setExpert(true);
+ visible.setHidden(true);
+
+ background.setBound(true);
+ foreground.setBound(true);
+ font.setBound(true);
+ focusable.setBound(true);
+
+ PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable };
+ return rv;
+ } catch (IntrospectionException e) {
+ throw new Error(e.toString());
+ }
+ }
+}
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -215,7 +215,7 @@
// ClientRequestInfo validity table (see ptc/00-08-06 table 21-1).
// Note: These must be in the same order as specified in contants.
- protected static final boolean validCall[][] = {
+ private static final boolean validCall[][] = {
// LEGEND:
// s_req = send_request r_rep = receive_reply
// s_pol = send_poll r_exc = receive_exception
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/interceptors/ServerRequestInfoImpl.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -195,7 +195,7 @@
// ServerRequestInfo validity table (see ptc/00-08-06 table 21-2).
// Note: These must be in the same order as specified in contants.
- protected static final boolean validCall[][] = {
+ private static final boolean validCall[][] = {
// LEGEND:
// r_rsc = receive_request_service_contexts
// r_req = receive_request
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -130,12 +130,25 @@
private UtilSystemException utilWrapper = UtilSystemException.get(
CORBALogDomains.RPC_ENCODING);
- public static Util instance = null;
+ private static Util instance = null;
public Util() {
- instance = this;
+ setInstance(this);
}
+ private static void setInstance( Util util ) {
+ assert instance == null : "Instance already defined";
+ instance = util;
+ }
+
+ public static Util getInstance() {
+ return instance;
+ }
+
+ public static boolean isInstanceDefined() {
+ return instance != null;
+ }
+
// Used by TOAFactory.shutdown to unexport all targets for this
// particular ORB. This happens during ORB shutdown.
public void unregisterTargetsForORB(org.omg.CORBA.ORB orb)
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@
activeObjectMap.putServant( servant, entry ) ;
- if (Util.instance != null) {
+ if (Util.isInstanceDefined()) {
POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
POAFactory factory = pm.getFactory() ;
factory.registerPOAForServant(poa, servant);
@@ -133,7 +133,7 @@
activeObjectMap.remove(key);
- if (Util.instance != null) {
+ if (Util.isInstanceDefined()) {
POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
POAFactory factory = pm.getFactory() ;
factory.unregisterPOAForServant(poa, s);
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/toa/TOAFactory.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/toa/TOAFactory.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/oa/toa/TOAFactory.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -78,8 +78,8 @@
public void shutdown( boolean waitForCompletion )
{
- if (Util.instance != null) {
- Util.instance.unregisterTargetsForORB(orb);
+ if (Util.isInstanceDefined()) {
+ Util.getInstance().unregisterTargetsForORB(orb);
}
}
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orb/ParserTable.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orb/ParserTable.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orb/ParserTable.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -106,7 +106,9 @@
public ParserData[] getParserData()
{
- return parserData ;
+ ParserData[] parserArray = new ParserData[parserData.length];
+ System.arraycopy(parserData, 0, parserArray, 0, parserData.length);
+ return parserArray;
}
private ParserTable() {
Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java
===================================================================
--- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java 2012-08-19 14:03:14 UTC (rev 5930)
+++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java 2012-09-23 09:24:10 UTC (rev 5931)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,7 @@
// legal use of '.' in a Java name.
public static final RepositoryIdCache_1_3 cache = new RepositoryIdCache_1_3();
- public static final byte[] IDL_IDENTIFIER_CHARS = {
+ private static final byte[] IDL_IDENTIFIER_CHARS = {
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
@@ -180,7 +180,7 @@
public static final String kRemoteTypeStr = "";
public static final String kRemoteValueRepID = "";
- public static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
+ private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
static {
kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
@@ -189,7 +189,7 @@
}
- public static final Hashtable kSpecialCasesRepIDs = new Hashtable();
+ private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
static {
kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
@@ -197,7 +197,7 @@
kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
}
- public static final Hashtable kSpecialCasesStubValues = new Hashtable();
+ private static final Hashtable kSpecialCasesStubValues = new Hashtable();
static {
kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
@@ -209,7 +209,7 @@
}
- public static final Hashtable kSpecialCasesVersions = new Hashtable();
+ private static final Hashtable kSpecialCasesVersions = new Hashtable();
static {
kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
@@ -220,7 +220,7 @@
kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
}
- public static final Hashtable kSpecialCasesClasses = new Hashtable();
+ private static final Hashtable kSpecialCasesClasses = new Hashtable();
static {
kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
@@ -232,7 +232,7 @@
//kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
}
- public static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
+ private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
static {
kSpecialCasesArrayPrefix.p...
[truncated message content] |