Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, 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
Expand Down Expand Up @@ -73,6 +73,7 @@ final class WildcardTypeImpl implements WildcardType {
* @return an array of types representing
* the upper bound(s) of this type variable
*/
@Override
public Type[] getUpperBounds() {
return this.upperBounds.clone();
}
Expand All @@ -87,6 +88,7 @@ public Type[] getUpperBounds() {
* @return an array of types representing
* the lower bound(s) of this type variable
*/
@Override
public Type[] getLowerBounds() {
return this.lowerBounds.clone();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
Expand Down Expand Up @@ -61,6 +61,7 @@ protected final ValueObject getValueObject() {
*
* @return {@code null} by default
*/
@Override
public Object getValue() {
return null;
}
Expand All @@ -70,6 +71,7 @@ public Object getValue() {
*
* @return {@code false} always
*/
@Override
public final boolean isVoid() {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
Expand Down Expand Up @@ -72,6 +72,7 @@ private ValueObjectImpl(Object value) {
*
* @return the result of method execution
*/
@Override
public Object getValue() {
return this.value;
}
Expand All @@ -82,6 +83,7 @@ public Object getValue() {
* @return {@code true} if value should be ignored,
* {@code false} otherwise
*/
@Override
public boolean isVoid() {
return this.isVoid;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2025, 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
Expand Down Expand Up @@ -34,20 +34,23 @@
public class BooleanEditor extends PropertyEditorSupport {


@Override
public String getJavaInitializationString() {
Object value = getValue();
return (value != null)
? value.toString()
: "null";
}

@Override
public String getAsText() {
Object value = getValue();
return (value instanceof Boolean)
? getValidName((Boolean) value)
: null;
}

@Override
public void setAsText(String text) throws java.lang.IllegalArgumentException {
if (text == null) {
setValue(null);
Expand All @@ -60,6 +63,7 @@ public void setAsText(String text) throws java.lang.IllegalArgumentException {
}
}

@Override
public String[] getTags() {
return new String[] {getValidName(true), getValidName(false)};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, 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
Expand Down Expand Up @@ -34,13 +34,15 @@

public class ByteEditor extends NumberEditor {

@Override
public String getJavaInitializationString() {
Object value = getValue();
return (value != null)
? "((byte)" + value + ")"
: "null";
}

@Override
public void setAsText(String text) throws IllegalArgumentException {
setValue((text == null) ? null : Byte.decode(text));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, 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
Expand Down Expand Up @@ -79,16 +79,19 @@ public ColorEditor() {
resize(ourWidth,40);
}

@Override
public void setValue(Object o) {
Color c = (Color)o;
changeColor(c);
}

@Override
@SuppressWarnings("deprecation")
public Dimension preferredSize() {
return new Dimension(ourWidth, 40);
}

@Override
@SuppressWarnings("deprecation")
public boolean keyUp(Event e, int key) {
if (e.target == text) {
Expand All @@ -101,6 +104,7 @@ public boolean keyUp(Event e, int key) {
return (false);
}

@Override
public void setAsText(String s) throws java.lang.IllegalArgumentException {
if (s == null) {
changeColor(null);
Expand All @@ -124,6 +128,7 @@ public void setAsText(String s) throws java.lang.IllegalArgumentException {

}

@Override
@SuppressWarnings("deprecation")
public boolean action(Event e, Object arg) {
if (e.target == chooser) {
Expand All @@ -132,6 +137,7 @@ public boolean action(Event e, Object arg) {
return false;
}

@Override
public String getJavaInitializationString() {
return (this.color != null)
? "new java.awt.Color(" + this.color.getRGB() + ",true)"
Expand Down Expand Up @@ -165,14 +171,17 @@ private void changeColor(Color c) {
support.firePropertyChange("", null, null);
}

@Override
public Object getValue() {
return color;
}

@Override
public boolean isPaintable() {
return true;
}

@Override
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
Color oldColor = gfx.getColor();
gfx.setColor(Color.black);
Expand All @@ -182,28 +191,34 @@ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
gfx.setColor(oldColor);
}

@Override
public String getAsText() {
return (this.color != null)
? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
: null;
}

@Override
public String[] getTags() {
return null;
}

@Override
public java.awt.Component getCustomEditor() {
return this;
}

@Override
public boolean supportsCustomEditor() {
return true;
}

@Override
public void addPropertyChangeListener(PropertyChangeListener l) {
support.addPropertyChangeListener(l);
}

@Override
public void removePropertyChangeListener(PropertyChangeListener l) {
support.removePropertyChangeListener(l);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, 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
Expand Down Expand Up @@ -34,6 +34,7 @@

public class DoubleEditor extends NumberEditor {

@Override
public void setAsText(String text) throws IllegalArgumentException {
setValue((text == null) ? null : Double.valueOf(text));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2025, 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
Expand Down Expand Up @@ -63,10 +63,12 @@ public EnumEditor(Class<?> type) {
}
}

@Override
public Object getValue() {
return this.value;
}

@Override
public void setValue( Object value ) {
if ( ( value != null ) && !this.type.isInstance( value ) ) {
throw new IllegalArgumentException( "Unsupported value: " + value );
Expand All @@ -92,12 +94,14 @@ public void setValue( Object value ) {
}
}

@Override
public String getAsText() {
return ( this.value != null )
? ( ( Enum )this.value ).name()
: null;
}

@Override
public void setAsText( String text ) {
@SuppressWarnings("unchecked")
Object tmp = ( text != null )
Expand All @@ -106,38 +110,46 @@ public void setAsText( String text ) {
setValue(tmp);
}

@Override
public String[] getTags() {
return this.tags.clone();
}

@Override
public String getJavaInitializationString() {
String name = getAsText();
return ( name != null )
? this.type.getName() + '.' + name
: "null";
}

@Override
public boolean isPaintable() {
return false;
}

@Override
public void paintValue( Graphics gfx, Rectangle box ) {
}

@Override
public boolean supportsCustomEditor() {
return false;
}

@Override
public Component getCustomEditor() {
return null;
}

@Override
public void addPropertyChangeListener( PropertyChangeListener listener ) {
synchronized ( this.listeners ) {
this.listeners.add( listener );
}
}

@Override
public void removePropertyChangeListener( PropertyChangeListener listener ) {
synchronized ( this.listeners ) {
this.listeners.remove( listener );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, 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
Expand Down Expand Up @@ -34,13 +34,15 @@

public class FloatEditor extends NumberEditor {

@Override
public String getJavaInitializationString() {
Object value = getValue();
return (value != null)
? value + "F"
: "null";
}

@Override
public void setAsText(String text) throws IllegalArgumentException {
setValue((text == null) ? null : Float.valueOf(text));
}
Expand Down
Loading