JComponent.java, [...]: New versions from classpath.

2003-06-19  Michael Koch  <konqueror@gmx.de>

	* javax/swing/JComponent.java,
	javax/swing/JInternalFrame.java,
	javax/swing/MenuSelectionManager.java,
	javax/swing/SwingUtilities.java,
	javax/swing/ToggleButtonModel.java:
	New versions from classpath.

From-SVN: r68207
This commit is contained in:
Michael Koch 2003-06-19 16:30:09 +00:00 committed by Michael Koch
parent 50af15ec61
commit 536a695f04
6 changed files with 89 additions and 107 deletions

View File

@ -1,3 +1,12 @@
2003-06-19 Michael Koch <konqueror@gmx.de>
* javax/swing/JComponent.java,
javax/swing/JInternalFrame.java,
javax/swing/MenuSelectionManager.java,
javax/swing/SwingUtilities.java,
javax/swing/ToggleButtonModel.java:
New versions from classpath.
2003-06-19 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java

View File

@ -66,7 +66,6 @@ import java.util.Hashtable;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleExtendedComponent;
import javax.accessibility.AccessibleKeyBinding;
import javax.accessibility.AccessibleRole;
import javax.accessibility.AccessibleStateSet;
import javax.swing.event.AncestorListener;
@ -116,16 +115,6 @@ public abstract class JComponent extends Container implements Serializable
* AccessibleFocusHandler
*/
protected class AccessibleFocusHandler implements FocusListener {
//-------------------------------------------------------------
// Variables --------------------------------------------------
//-------------------------------------------------------------
//-------------------------------------------------------------
// Initialization ---------------------------------------------
//-------------------------------------------------------------
/**
* Constructor AccessibleFocusHandler
* @param component TODO
@ -134,11 +123,6 @@ public abstract class JComponent extends Container implements Serializable
// TODO
} // AccessibleFocusHandler()
//-------------------------------------------------------------
// Methods ----------------------------------------------------
//-------------------------------------------------------------
/**
* focusGained
* @param event TODO
@ -154,24 +138,12 @@ public abstract class JComponent extends Container implements Serializable
public void focusLost(FocusEvent valevent) {
// TODO
} // focusLost()
} // AccessibleFocusHandler
/**
* AccessibleContainerHandler
*/
protected class AccessibleContainerHandler implements ContainerListener {
//-------------------------------------------------------------
// Variables --------------------------------------------------
//-------------------------------------------------------------
//-------------------------------------------------------------
// Initialization ---------------------------------------------
//-------------------------------------------------------------
/**
* Constructor AccessibleContainerHandler
* @param component TODO
@ -180,11 +152,6 @@ public abstract class JComponent extends Container implements Serializable
// TODO
} // AccessibleContainerHandler()
//-------------------------------------------------------------
// Methods ----------------------------------------------------
//-------------------------------------------------------------
/**
* componentAdded
* @param event TODO
@ -200,15 +167,8 @@ public abstract class JComponent extends Container implements Serializable
public void componentRemoved(ContainerEvent valevent) {
// TODO
} // componentRemoved()
} // AccessibleContainerHandler
//-------------------------------------------------------------
// Variables --------------------------------------------------
//-------------------------------------------------------------
/**
* accessibleContainerHandler
*/
@ -219,11 +179,6 @@ public abstract class JComponent extends Container implements Serializable
*/
protected FocusListener accessibleFocusHandler;
//-------------------------------------------------------------
// Initialization ---------------------------------------------
//-------------------------------------------------------------
/**
* Constructor AccessibleJComponent
* @param component TODO
@ -233,11 +188,6 @@ public abstract class JComponent extends Container implements Serializable
// TODO
} // AccessibleJComponent()
//-------------------------------------------------------------
// Methods ----------------------------------------------------
//-------------------------------------------------------------
/**
* addPropertyChangeListener
* @param listener TODO
@ -327,7 +277,6 @@ public abstract class JComponent extends Container implements Serializable
//updateUI(); // get a proper ui
}
// protected EventListenerList listenerList
public boolean contains(int x, int y)
{
@ -335,14 +284,12 @@ public abstract class JComponent extends Container implements Serializable
return super.contains(x,y);
}
public void addNotify()
{
//Notification to this component that it now has a parent component.
super.addNotify();
}
Hashtable get_prop_hash()
{
if (prop_hash == null)
@ -374,7 +321,6 @@ public abstract class JComponent extends Container implements Serializable
public void putClientProperty(Object key, Object value)
{ get_prop_hash().put(key, value); }
public void removeAncestorListener(AncestorListener listener)
{ get_ancestor_list().removeElement(listener); }
@ -405,7 +351,6 @@ public abstract class JComponent extends Container implements Serializable
//super.computeVisibleRect(rect);
}
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
{
//Reports a bound property change.
@ -446,7 +391,6 @@ public abstract class JComponent extends Container implements Serializable
// Reports a bound property change.
}
protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue)
{
// Support for reporting constrained property changes.
@ -658,16 +602,6 @@ public abstract class JComponent extends Container implements Serializable
}
}
/*********************************************************************
*
*
* tooltips:
*
*
**************************************/
public JToolTip createToolTip()
{
if (tooltip == null)
@ -687,15 +621,6 @@ public abstract class JComponent extends Container implements Serializable
public String getToolTipText(MouseEvent event)
{ return tool_tip_text; }
/*********************************************************************
*
*
* things to do with visibility:
*
*
**************************************/
public Container getTopLevelAncestor()
{
// Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container.
@ -953,7 +878,6 @@ public abstract class JComponent extends Container implements Serializable
// If true this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling, such as JViewport
}
public void setDebugGraphicsOptions(int debugOptions)
{
// Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.
@ -977,6 +901,7 @@ public abstract class JComponent extends Container implements Serializable
revalidate();
repaint();
}
public void setBackground(Color bg)
{
super.setBackground(bg);
@ -1043,16 +968,6 @@ public abstract class JComponent extends Container implements Serializable
paint(g);
}
/******************************************
*
*
* UI management
*
*
*********/
public String getUIClassID()
{
/// Return the UIDefaults key used to look up the name of the swing.

View File

@ -35,11 +35,27 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing;
/**
* STUBBED
*/
import java.awt.Component;
import java.awt.Container;
import javax.accessibility.Accessible;
public class JInternalFrame extends JComponent
/*implements Accessible, WindowConstants, RootPaneContainer*/
{
private static final long serialVersionUID = -5425177187760785402L;
public static final String CONTENT_PANE_PROPERTY = "contentPane";
public static final String MENU_BAR_PROPERTY = "JMenuBar";
public static final String TITLE_PROPERTY = "title";
public static final String LAYERED_PANE_PROPERTY = "layeredPane";
public static final String ROOT_PANE_PROPERTY = "rootPane";
public static final String GLASS_PANE_PROPERTY = "glassPane";
public static final String FRAME_ICON_PROPERTY = "frameIcon";
public static final String IS_SELECTED_PROPERTY = "selected";
public static final String IS_CLOSED_PROPERTY = "closed";
public static final String IS_MAXIMUM_PROPERTY = "maximum";
public static final String IS_ICON_PROPERTY = "icon";
} // class JInternalFrame

View File

@ -35,10 +35,42 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing;
/**
* STUBBED
*/
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
public class MenuSelectionManager
{
protected ChangeEvent changeEvent;
protected EventListenerList listenerList = new EventListenerList ();
protected void fireStateChanged ()
{
ChangeListener[] listeners = getChangeListeners ();
for (int i = 0; i < listeners.length; i++)
{
listeners [i].stateChanged (new ChangeEvent (this));
}
}
public void addChangeListener (ChangeListener listener)
{
listenerList.add (ChangeListener.class, listener);
}
public void removeChangeListener (ChangeListener listener)
{
listenerList.remove (ChangeListener.class, listener);
}
/** @since 1.4 */
public ChangeListener[] getChangeListeners ()
{
return (ChangeListener[]) listenerList.getListeners (ChangeListener.class);
}
} // class MenuSelectionManager

View File

@ -35,20 +35,34 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing;
import java.awt.*;
import java.awt.Component;
import java.awt.Container;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.lang.reflect.InvocationTargetException;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleStateSet;
public class SwingUtilities
public class SwingUtilities implements SwingConstants
{
public static FontMetrics getFontMetrics (Font font)
{
public static FontMetrics getFontMetrics ( Font font ) {
return Toolkit.getDefaultToolkit().getFontMetrics(font);
}
static JRootPane getRootPane(Component a)
public static JRootPane getRootPane (Component a)
{
if (a instanceof JRootPane)
return (JRootPane) a;
@ -63,11 +77,11 @@ public class SwingUtilities
return null;
}
static void updateComponentTreeUI(JFrame comp)
public static void updateComponentTreeUI(JFrame comp)
{
}
static public String layoutCompoundLabel(JComponent c,
public static String layoutCompoundLabel(JComponent c,
FontMetrics fm,
String text,
Icon i,

View File

@ -35,14 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing;
import java.util.*;
import java.awt.event.*;
import javax.swing.event.*;
public
class ToggleButtonModel extends DefaultButtonModel
public class ToggleButtonModel extends DefaultButtonModel
{
ToggleButtonModel(JComponent c)
{