feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
50
jdkSrc/jdk8/java/awt/peer/ButtonPeer.java
Normal file
50
jdkSrc/jdk8/java/awt/peer/ButtonPeer.java
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Button;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Button}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ButtonPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets the label that is displayed on the button. Can be {@code null}
|
||||
* when the button should not display a label.
|
||||
*
|
||||
* @param label the label string to set
|
||||
*
|
||||
* @see Button#setLabel
|
||||
*/
|
||||
void setLabel(String label);
|
||||
}
|
||||
49
jdkSrc/jdk8/java/awt/peer/CanvasPeer.java
Normal file
49
jdkSrc/jdk8/java/awt/peer/CanvasPeer.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Canvas;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Canvas}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface CanvasPeer extends ComponentPeer {
|
||||
/**
|
||||
* Requests a GC that best suits this Canvas. The returned GC may differ
|
||||
* from the requested GC passed as the argument to this method. This method
|
||||
* must return a non-null value (given the argument is non-null as well).
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
GraphicsConfiguration getAppropriateGraphicsConfiguration(
|
||||
GraphicsConfiguration gc);
|
||||
}
|
||||
49
jdkSrc/jdk8/java/awt/peer/CheckboxMenuItemPeer.java
Normal file
49
jdkSrc/jdk8/java/awt/peer/CheckboxMenuItemPeer.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, 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 java.awt.peer;
|
||||
|
||||
import java.awt.CheckboxMenuItem;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link CheckboxMenuItem}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface CheckboxMenuItemPeer extends MenuItemPeer {
|
||||
|
||||
/**
|
||||
* Sets the state of the checkbox to be checked {@code true} or
|
||||
* unchecked {@code false}.
|
||||
*
|
||||
* @param state the state to set on the checkbox
|
||||
*
|
||||
* @see CheckboxMenuItem#setState(boolean)
|
||||
*/
|
||||
void setState(boolean state);
|
||||
}
|
||||
72
jdkSrc/jdk8/java/awt/peer/CheckboxPeer.java
Normal file
72
jdkSrc/jdk8/java/awt/peer/CheckboxPeer.java
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Checkbox;
|
||||
import java.awt.CheckboxGroup;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Checkbox}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface CheckboxPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets the state of the checkbox to be checked {@code true} or
|
||||
* unchecked {@code false}.
|
||||
*
|
||||
* @param state the state to set on the checkbox
|
||||
*
|
||||
* @see Checkbox#setState(boolean)
|
||||
*/
|
||||
void setState(boolean state);
|
||||
|
||||
/**
|
||||
* Sets the checkbox group for this checkbox. Checkboxes in one checkbox
|
||||
* group can only be selected exclusively (like radio buttons). A value
|
||||
* of {@code null} removes this checkbox from any checkbox group.
|
||||
*
|
||||
* @param g the checkbox group to set, or {@code null} when this
|
||||
* checkbox should not be placed in any group
|
||||
*
|
||||
* @see Checkbox#setCheckboxGroup(CheckboxGroup)
|
||||
*/
|
||||
void setCheckboxGroup(CheckboxGroup g);
|
||||
|
||||
/**
|
||||
* Sets the label that should be displayed on the checkbox. A value of
|
||||
* {@code null} means that no label should be displayed.
|
||||
*
|
||||
* @param label the label to be displayed on the checkbox, or
|
||||
* {@code null} when no label should be displayed.
|
||||
*/
|
||||
void setLabel(String label);
|
||||
|
||||
}
|
||||
76
jdkSrc/jdk8/java/awt/peer/ChoicePeer.java
Normal file
76
jdkSrc/jdk8/java/awt/peer/ChoicePeer.java
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Choice;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Choice}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ChoicePeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Adds an item with the string {@code item} to the combo box list
|
||||
* at index {@code index}.
|
||||
*
|
||||
* @param item the label to be added to the list
|
||||
* @param index the index where to add the item
|
||||
*
|
||||
* @see Choice#add(String)
|
||||
*/
|
||||
void add(String item, int index);
|
||||
|
||||
/**
|
||||
* Removes the item at index {@code index} from the combo box list.
|
||||
*
|
||||
* @param index the index where to remove the item
|
||||
*
|
||||
* @see Choice#remove(int)
|
||||
*/
|
||||
void remove(int index);
|
||||
|
||||
/**
|
||||
* Removes all items from the combo box list.
|
||||
*
|
||||
* @see Choice#removeAll()
|
||||
*/
|
||||
void removeAll();
|
||||
|
||||
/**
|
||||
* Selects the item at index {@code index}.
|
||||
*
|
||||
* @param index the index which should be selected
|
||||
*
|
||||
* @see Choice#select(int)
|
||||
*/
|
||||
void select(int index);
|
||||
|
||||
}
|
||||
546
jdkSrc/jdk8/java/awt/peer/ComponentPeer.java
Normal file
546
jdkSrc/jdk8/java/awt/peer/ComponentPeer.java
Normal file
@@ -0,0 +1,546 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, 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 java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.PaintEvent;
|
||||
import java.awt.image.ColorModel;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.awt.image.ImageProducer;
|
||||
import java.awt.image.VolatileImage;
|
||||
|
||||
import sun.awt.CausedFocusEvent;
|
||||
import sun.java2d.pipe.Region;
|
||||
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Component}. This is the top level peer
|
||||
* interface for widgets and defines the bulk of methods for AWT component
|
||||
* peers. Most component peers have to implement this interface (via one
|
||||
* of the subinterfaces), except menu components, which implement
|
||||
* {@link MenuComponentPeer}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ComponentPeer {
|
||||
|
||||
/**
|
||||
* Operation for {@link #setBounds(int, int, int, int, int)}, indicating
|
||||
* a change in the component location only.
|
||||
*
|
||||
* @see #setBounds(int, int, int, int, int)
|
||||
*/
|
||||
public static final int SET_LOCATION = 1;
|
||||
|
||||
/**
|
||||
* Operation for {@link #setBounds(int, int, int, int, int)}, indicating
|
||||
* a change in the component size only.
|
||||
*
|
||||
* @see #setBounds(int, int, int, int, int)
|
||||
*/
|
||||
public static final int SET_SIZE = 2;
|
||||
|
||||
/**
|
||||
* Operation for {@link #setBounds(int, int, int, int, int)}, indicating
|
||||
* a change in the component size and location.
|
||||
*
|
||||
* @see #setBounds(int, int, int, int, int)
|
||||
*/
|
||||
public static final int SET_BOUNDS = 3;
|
||||
|
||||
/**
|
||||
* Operation for {@link #setBounds(int, int, int, int, int)}, indicating
|
||||
* a change in the component client size. This is used for setting
|
||||
* the 'inside' size of windows, without the border insets.
|
||||
*
|
||||
* @see #setBounds(int, int, int, int, int)
|
||||
*/
|
||||
public static final int SET_CLIENT_SIZE = 4;
|
||||
|
||||
/**
|
||||
* Resets the setBounds() operation to DEFAULT_OPERATION. This is not
|
||||
* passed into {@link #setBounds(int, int, int, int, int)}.
|
||||
*
|
||||
* TODO: This is only used internally and should probably be moved outside
|
||||
* the peer interface.
|
||||
*
|
||||
* @see Component#setBoundsOp
|
||||
*/
|
||||
public static final int RESET_OPERATION = 5;
|
||||
|
||||
/**
|
||||
* A flag that is used to suppress checks for embedded frames.
|
||||
*
|
||||
* TODO: This is only used internally and should probably be moved outside
|
||||
* the peer interface.
|
||||
*/
|
||||
public static final int NO_EMBEDDED_CHECK = (1 << 14);
|
||||
|
||||
/**
|
||||
* The default operation, which is to set size and location.
|
||||
*
|
||||
* TODO: This is only used internally and should probably be moved outside
|
||||
* the peer interface.
|
||||
*
|
||||
* @see Component#setBoundsOp
|
||||
*/
|
||||
public static final int DEFAULT_OPERATION = SET_BOUNDS;
|
||||
|
||||
/**
|
||||
* Determines if a component has been obscured, i.e. by an overlapping
|
||||
* window or similar. This is used by JViewport for optimizing performance.
|
||||
* This doesn't have to be implemented, when
|
||||
* {@link #canDetermineObscurity()} returns {@code false}.
|
||||
*
|
||||
* @return {@code true} when the component has been obscured,
|
||||
* {@code false} otherwise
|
||||
*
|
||||
* @see #canDetermineObscurity()
|
||||
* @see javax.swing.JViewport#needsRepaintAfterBlit
|
||||
*/
|
||||
boolean isObscured();
|
||||
|
||||
/**
|
||||
* Returns {@code true} when the peer can determine if a component
|
||||
* has been obscured, {@code false} false otherwise.
|
||||
*
|
||||
* @return {@code true} when the peer can determine if a component
|
||||
* has been obscured, {@code false} false otherwise
|
||||
*
|
||||
* @see #isObscured()
|
||||
* @see javax.swing.JViewport#needsRepaintAfterBlit
|
||||
*/
|
||||
boolean canDetermineObscurity();
|
||||
|
||||
/**
|
||||
* Makes a component visible or invisible.
|
||||
*
|
||||
* @param v {@code true} to make a component visible,
|
||||
* {@code false} to make it invisible
|
||||
*
|
||||
* @see Component#setVisible(boolean)
|
||||
*/
|
||||
void setVisible(boolean v);
|
||||
|
||||
/**
|
||||
* Enables or disables a component. Disabled components are usually grayed
|
||||
* out and cannot be activated.
|
||||
*
|
||||
* @param e {@code true} to enable the component, {@code false}
|
||||
* to disable it
|
||||
*
|
||||
* @see Component#setEnabled(boolean)
|
||||
*/
|
||||
void setEnabled(boolean e);
|
||||
|
||||
/**
|
||||
* Paints the component to the specified graphics context. This is called
|
||||
* by {@link Component#paintAll(Graphics)} to paint the component.
|
||||
*
|
||||
* @param g the graphics context to paint to
|
||||
*
|
||||
* @see Component#paintAll(Graphics)
|
||||
*/
|
||||
void paint(Graphics g);
|
||||
|
||||
/**
|
||||
* Prints the component to the specified graphics context. This is called
|
||||
* by {@link Component#printAll(Graphics)} to print the component.
|
||||
*
|
||||
* @param g the graphics context to print to
|
||||
*
|
||||
* @see Component#printAll(Graphics)
|
||||
*/
|
||||
void print(Graphics g);
|
||||
|
||||
/**
|
||||
* Sets the location or size or both of the component. The location is
|
||||
* specified relative to the component's parent. The {@code op}
|
||||
* parameter specifies which properties change. If it is
|
||||
* {@link #SET_LOCATION}, then only the location changes (and the size
|
||||
* parameters can be ignored). If {@code op} is {@link #SET_SIZE},
|
||||
* then only the size changes (and the location can be ignored). If
|
||||
* {@code op} is {@link #SET_BOUNDS}, then both change. There is a
|
||||
* special value {@link #SET_CLIENT_SIZE}, which is used only for
|
||||
* window-like components to set the size of the client (i.e. the 'inner'
|
||||
* size, without the insets of the window borders).
|
||||
*
|
||||
* @param x the X location of the component
|
||||
* @param y the Y location of the component
|
||||
* @param width the width of the component
|
||||
* @param height the height of the component
|
||||
* @param op the operation flag
|
||||
*
|
||||
* @see #SET_BOUNDS
|
||||
* @see #SET_LOCATION
|
||||
* @see #SET_SIZE
|
||||
* @see #SET_CLIENT_SIZE
|
||||
*/
|
||||
void setBounds(int x, int y, int width, int height, int op);
|
||||
|
||||
/**
|
||||
* Called to let the component peer handle events.
|
||||
*
|
||||
* @param e the AWT event to handle
|
||||
*
|
||||
* @see Component#dispatchEvent(AWTEvent)
|
||||
*/
|
||||
void handleEvent(AWTEvent e);
|
||||
|
||||
/**
|
||||
* Called to coalesce paint events.
|
||||
*
|
||||
* @param e the paint event to consider to coalesce
|
||||
*
|
||||
* @see EventQueue#coalescePaintEvent
|
||||
*/
|
||||
void coalescePaintEvent(PaintEvent e);
|
||||
|
||||
/**
|
||||
* Determines the location of the component on the screen.
|
||||
*
|
||||
* @return the location of the component on the screen
|
||||
*
|
||||
* @see Component#getLocationOnScreen()
|
||||
*/
|
||||
Point getLocationOnScreen();
|
||||
|
||||
/**
|
||||
* Determines the preferred size of the component.
|
||||
*
|
||||
* @return the preferred size of the component
|
||||
*
|
||||
* @see Component#getPreferredSize()
|
||||
*/
|
||||
Dimension getPreferredSize();
|
||||
|
||||
/**
|
||||
* Determines the minimum size of the component.
|
||||
*
|
||||
* @return the minimum size of the component
|
||||
*
|
||||
* @see Component#getMinimumSize()
|
||||
*/
|
||||
Dimension getMinimumSize();
|
||||
|
||||
/**
|
||||
* Returns the color model used by the component.
|
||||
*
|
||||
* @return the color model used by the component
|
||||
*
|
||||
* @see Component#getColorModel()
|
||||
*/
|
||||
ColorModel getColorModel();
|
||||
|
||||
/**
|
||||
* Returns a graphics object to paint on the component.
|
||||
*
|
||||
* @return a graphics object to paint on the component
|
||||
*
|
||||
* @see Component#getGraphics()
|
||||
*/
|
||||
// TODO: Maybe change this to force Graphics2D, since many things will
|
||||
// break with plain Graphics nowadays.
|
||||
Graphics getGraphics();
|
||||
|
||||
/**
|
||||
* Returns a font metrics object to determine the metrics properties of
|
||||
* the specified font.
|
||||
*
|
||||
* @param font the font to determine the metrics for
|
||||
*
|
||||
* @return a font metrics object to determine the metrics properties of
|
||||
* the specified font
|
||||
*
|
||||
* @see Component#getFontMetrics(Font)
|
||||
*/
|
||||
FontMetrics getFontMetrics(Font font);
|
||||
|
||||
/**
|
||||
* Disposes all resources held by the component peer. This is called
|
||||
* when the component has been disconnected from the component hierarchy
|
||||
* and is about to be garbage collected.
|
||||
*
|
||||
* @see Component#removeNotify()
|
||||
*/
|
||||
void dispose();
|
||||
|
||||
/**
|
||||
* Sets the foreground color of this component.
|
||||
*
|
||||
* @param c the foreground color to set
|
||||
*
|
||||
* @see Component#setForeground(Color)
|
||||
*/
|
||||
void setForeground(Color c);
|
||||
|
||||
/**
|
||||
* Sets the background color of this component.
|
||||
*
|
||||
* @param c the background color to set
|
||||
*
|
||||
* @see Component#setBackground(Color)
|
||||
*/
|
||||
void setBackground(Color c);
|
||||
|
||||
/**
|
||||
* Sets the font of this component.
|
||||
*
|
||||
* @param f the font of this component
|
||||
*
|
||||
* @see Component#setFont(Font)
|
||||
*/
|
||||
void setFont(Font f);
|
||||
|
||||
/**
|
||||
* Updates the cursor of the component.
|
||||
*
|
||||
* @see Component#updateCursorImmediately
|
||||
*/
|
||||
void updateCursorImmediately();
|
||||
|
||||
/**
|
||||
* Requests focus on this component.
|
||||
*
|
||||
* @param lightweightChild the actual lightweight child that requests the
|
||||
* focus
|
||||
* @param temporary {@code true} if the focus change is temporary,
|
||||
* {@code false} otherwise
|
||||
* @param focusedWindowChangeAllowed {@code true} if changing the
|
||||
* focus of the containing window is allowed or not
|
||||
* @param time the time of the focus change request
|
||||
* @param cause the cause of the focus change request
|
||||
*
|
||||
* @return {@code true} if the focus change is guaranteed to be
|
||||
* granted, {@code false} otherwise
|
||||
*/
|
||||
boolean requestFocus(Component lightweightChild, boolean temporary,
|
||||
boolean focusedWindowChangeAllowed, long time,
|
||||
CausedFocusEvent.Cause cause);
|
||||
|
||||
/**
|
||||
* Returns {@code true} when the component takes part in the focus
|
||||
* traversal, {@code false} otherwise.
|
||||
*
|
||||
* @return {@code true} when the component takes part in the focus
|
||||
* traversal, {@code false} otherwise
|
||||
*/
|
||||
boolean isFocusable();
|
||||
|
||||
/**
|
||||
* Creates an image using the specified image producer.
|
||||
*
|
||||
* @param producer the image producer from which the image pixels will be
|
||||
* produced
|
||||
*
|
||||
* @return the created image
|
||||
*
|
||||
* @see Component#createImage(ImageProducer)
|
||||
*/
|
||||
Image createImage(ImageProducer producer);
|
||||
|
||||
/**
|
||||
* Creates an empty image with the specified width and height. This is
|
||||
* generally used as a non-accelerated backbuffer for drawing onto the
|
||||
* component (e.g. by Swing).
|
||||
*
|
||||
* @param width the width of the image
|
||||
* @param height the height of the image
|
||||
*
|
||||
* @return the created image
|
||||
*
|
||||
* @see Component#createImage(int, int)
|
||||
*/
|
||||
// TODO: Maybe make that return a BufferedImage, because some stuff will
|
||||
// break if a different kind of image is returned.
|
||||
Image createImage(int width, int height);
|
||||
|
||||
/**
|
||||
* Creates an empty volatile image with the specified width and height.
|
||||
* This is generally used as an accelerated backbuffer for drawing onto
|
||||
* the component (e.g. by Swing).
|
||||
*
|
||||
* @param width the width of the image
|
||||
* @param height the height of the image
|
||||
*
|
||||
* @return the created volatile image
|
||||
*
|
||||
* @see Component#createVolatileImage(int, int)
|
||||
*/
|
||||
// TODO: Include capabilities here and fix Component#createVolatileImage
|
||||
VolatileImage createVolatileImage(int width, int height);
|
||||
|
||||
/**
|
||||
* Prepare the specified image for rendering on this component. This should
|
||||
* start loading the image (if not already loaded) and create an
|
||||
* appropriate screen representation.
|
||||
*
|
||||
* @param img the image to prepare
|
||||
* @param w the width of the screen representation
|
||||
* @param h the height of the screen representation
|
||||
* @param o an image observer to observe the progress
|
||||
*
|
||||
* @return {@code true} if the image is already fully prepared,
|
||||
* {@code false} otherwise
|
||||
*
|
||||
* @see Component#prepareImage(Image, int, int, ImageObserver)
|
||||
*/
|
||||
boolean prepareImage(Image img, int w, int h, ImageObserver o);
|
||||
|
||||
/**
|
||||
* Determines the status of the construction of the screen representaion
|
||||
* of the specified image.
|
||||
*
|
||||
* @param img the image to check
|
||||
* @param w the target width
|
||||
* @param h the target height
|
||||
* @param o the image observer to notify
|
||||
*
|
||||
* @return the status as bitwise ORed ImageObserver flags
|
||||
*
|
||||
* @see Component#checkImage(Image, int, int, ImageObserver)
|
||||
*/
|
||||
int checkImage(Image img, int w, int h, ImageObserver o);
|
||||
|
||||
/**
|
||||
* Returns the graphics configuration that corresponds to this component.
|
||||
*
|
||||
* @return the graphics configuration that corresponds to this component
|
||||
*
|
||||
* @see Component#getGraphicsConfiguration()
|
||||
*/
|
||||
GraphicsConfiguration getGraphicsConfiguration();
|
||||
|
||||
/**
|
||||
* Determines if the component handles wheel scrolling itself. Otherwise
|
||||
* it is delegated to the component's parent.
|
||||
*
|
||||
* @return {@code true} if the component handles wheel scrolling,
|
||||
* {@code false} otherwise
|
||||
*
|
||||
* @see Component#dispatchEventImpl(AWTEvent)
|
||||
*/
|
||||
boolean handlesWheelScrolling();
|
||||
|
||||
/**
|
||||
* Create {@code numBuffers} flipping buffers with the specified
|
||||
* buffer capabilities.
|
||||
*
|
||||
* @param numBuffers the number of buffers to create
|
||||
* @param caps the buffer capabilities
|
||||
*
|
||||
* @throws AWTException if flip buffering is not supported
|
||||
*
|
||||
* @see Component.FlipBufferStrategy#createBuffers
|
||||
*/
|
||||
void createBuffers(int numBuffers, BufferCapabilities caps)
|
||||
throws AWTException;
|
||||
|
||||
/**
|
||||
* Returns the back buffer as image.
|
||||
*
|
||||
* @return the back buffer as image
|
||||
*
|
||||
* @see Component.FlipBufferStrategy#getBackBuffer
|
||||
*/
|
||||
Image getBackBuffer();
|
||||
|
||||
/**
|
||||
* Move the back buffer to the front buffer.
|
||||
*
|
||||
* @param x1 the area to be flipped, upper left X coordinate
|
||||
* @param y1 the area to be flipped, upper left Y coordinate
|
||||
* @param x2 the area to be flipped, lower right X coordinate
|
||||
* @param y2 the area to be flipped, lower right Y coordinate
|
||||
* @param flipAction the flip action to perform
|
||||
*
|
||||
* @see Component.FlipBufferStrategy#flip
|
||||
*/
|
||||
void flip(int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction);
|
||||
|
||||
/**
|
||||
* Destroys all created buffers.
|
||||
*
|
||||
* @see Component.FlipBufferStrategy#destroyBuffers
|
||||
*/
|
||||
void destroyBuffers();
|
||||
|
||||
/**
|
||||
* Reparents this peer to the new parent referenced by
|
||||
* {@code newContainer} peer. Implementation depends on toolkit and
|
||||
* container.
|
||||
*
|
||||
* @param newContainer peer of the new parent container
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
void reparent(ContainerPeer newContainer);
|
||||
|
||||
/**
|
||||
* Returns whether this peer supports reparenting to another parent without
|
||||
* destroying the peer.
|
||||
*
|
||||
* @return true if appropriate reparent is supported, false otherwise
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
boolean isReparentSupported();
|
||||
|
||||
/**
|
||||
* Used by lightweight implementations to tell a ComponentPeer to layout
|
||||
* its sub-elements. For instance, a lightweight Checkbox needs to layout
|
||||
* the box, as well as the text label.
|
||||
*
|
||||
* @see Component#validate()
|
||||
*/
|
||||
void layout();
|
||||
|
||||
/**
|
||||
* Applies the shape to the native component window.
|
||||
* @since 1.7
|
||||
*
|
||||
* @see Component#applyCompoundShape
|
||||
*/
|
||||
void applyShape(Region shape);
|
||||
|
||||
/**
|
||||
* Lowers this component at the bottom of the above HW peer. If the above parameter
|
||||
* is null then the method places this component at the top of the Z-order.
|
||||
*/
|
||||
void setZOrder(ComponentPeer above);
|
||||
|
||||
/**
|
||||
* Updates internal data structures related to the component's GC.
|
||||
*
|
||||
* @return if the peer needs to be recreated for the changes to take effect
|
||||
* @since 1.7
|
||||
*/
|
||||
boolean updateGraphicsData(GraphicsConfiguration gc);
|
||||
}
|
||||
79
jdkSrc/jdk8/java/awt/peer/ContainerPeer.java
Normal file
79
jdkSrc/jdk8/java/awt/peer/ContainerPeer.java
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2005, 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 java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Container}. This is the parent interface
|
||||
* for all container like widgets.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ContainerPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Returns the insets of this container. Insets usually is the space that
|
||||
* is occupied by things like borders.
|
||||
*
|
||||
* @return the insets of this container
|
||||
*/
|
||||
Insets getInsets();
|
||||
|
||||
/**
|
||||
* Notifies the peer that validation of the component tree is about to
|
||||
* begin.
|
||||
*
|
||||
* @see Container#validate()
|
||||
*/
|
||||
void beginValidate();
|
||||
|
||||
/**
|
||||
* Notifies the peer that validation of the component tree is finished.
|
||||
*
|
||||
* @see Container#validate()
|
||||
*/
|
||||
void endValidate();
|
||||
|
||||
/**
|
||||
* Notifies the peer that layout is about to begin. This is called
|
||||
* before the container itself and its children are laid out.
|
||||
*
|
||||
* @see Container#validateTree()
|
||||
*/
|
||||
void beginLayout();
|
||||
|
||||
/**
|
||||
* Notifies the peer that layout is finished. This is called after the
|
||||
* container and its children have been laid out.
|
||||
*
|
||||
* @see Container#validateTree()
|
||||
*/
|
||||
void endLayout();
|
||||
}
|
||||
107
jdkSrc/jdk8/java/awt/peer/DesktopPeer.java
Normal file
107
jdkSrc/jdk8/java/awt/peer/DesktopPeer.java
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, 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 java.awt.peer;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.awt.Desktop.Action;
|
||||
|
||||
/**
|
||||
* The {@code DesktopPeer} interface provides methods for the operation
|
||||
* of open, edit, print, browse and mail with the given URL or file, by
|
||||
* launching the associated application.
|
||||
* <p>
|
||||
* Each platform has an implementation class for this interface.
|
||||
*
|
||||
*/
|
||||
public interface DesktopPeer {
|
||||
|
||||
/**
|
||||
* Returns whether the given action is supported on the current platform.
|
||||
* @param action the action type to be tested if it's supported on the
|
||||
* current platform.
|
||||
* @return {@code true} if the given action is supported on
|
||||
* the current platform; {@code false} otherwise.
|
||||
*/
|
||||
boolean isSupported(Action action);
|
||||
|
||||
/**
|
||||
* Launches the associated application to open the given file. The
|
||||
* associated application is registered to be the default file viewer for
|
||||
* the file type of the given file.
|
||||
*
|
||||
* @param file the given file.
|
||||
* @throws IOException If the given file has no associated application,
|
||||
* or the associated application fails to be launched.
|
||||
*/
|
||||
void open(File file) throws IOException;
|
||||
|
||||
/**
|
||||
* Launches the associated editor and opens the given file for editing. The
|
||||
* associated editor is registered to be the default editor for the file
|
||||
* type of the given file.
|
||||
*
|
||||
* @param file the given file.
|
||||
* @throws IOException If the given file has no associated editor, or
|
||||
* the associated application fails to be launched.
|
||||
*/
|
||||
void edit(File file) throws IOException;
|
||||
|
||||
/**
|
||||
* Prints the given file with the native desktop printing facility, using
|
||||
* the associated application's print command.
|
||||
*
|
||||
* @param file the given file.
|
||||
* @throws IOException If the given file has no associated application
|
||||
* that can be used to print it.
|
||||
*/
|
||||
void print(File file) throws IOException;
|
||||
|
||||
/**
|
||||
* Launches the mail composing window of the user default mail client,
|
||||
* filling the message fields including to, cc, etc, with the values
|
||||
* specified by the given mailto URL.
|
||||
*
|
||||
* @param mailtoURL represents a mailto URL with specified values of the message.
|
||||
* The syntax of mailto URL is defined by
|
||||
* <a href="http://www.ietf.org/rfc/rfc2368.txt">RFC2368: The mailto
|
||||
* URL scheme</a>
|
||||
* @throws IOException If the user default mail client is not found,
|
||||
* or it fails to be launched.
|
||||
*/
|
||||
void mail(URI mailtoURL) throws IOException;
|
||||
|
||||
/**
|
||||
* Launches the user default browser to display the given URI.
|
||||
*
|
||||
* @param uri the given URI.
|
||||
* @throws IOException If the user default browser is not found,
|
||||
* or it fails to be launched.
|
||||
*/
|
||||
void browse(URI uri) throws IOException;
|
||||
}
|
||||
70
jdkSrc/jdk8/java/awt/peer/DialogPeer.java
Normal file
70
jdkSrc/jdk8/java/awt/peer/DialogPeer.java
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Dialog}. This adds a couple of dialog specific
|
||||
* features to the {@link WindowPeer} interface.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface DialogPeer extends WindowPeer {
|
||||
|
||||
/**
|
||||
* Sets the title on the dialog window.
|
||||
*
|
||||
* @param title the title to set
|
||||
*
|
||||
* @see Dialog#setTitle(String)
|
||||
*/
|
||||
void setTitle(String title);
|
||||
|
||||
/**
|
||||
* Sets if the dialog should be resizable or not.
|
||||
*
|
||||
* @param resizeable {@code true} when the dialog should be resizable,
|
||||
* {@code false} if not
|
||||
*
|
||||
* @see Dialog#setResizable(boolean)
|
||||
*/
|
||||
void setResizable(boolean resizeable);
|
||||
|
||||
/**
|
||||
* Block the specified windows. This is used for modal dialogs.
|
||||
*
|
||||
* @param windows the windows to block
|
||||
*
|
||||
* @see Dialog#modalShow()
|
||||
* @see Dialog#blockWindows()
|
||||
*/
|
||||
void blockWindows(java.util.List<Window> windows);
|
||||
}
|
||||
69
jdkSrc/jdk8/java/awt/peer/FileDialogPeer.java
Normal file
69
jdkSrc/jdk8/java/awt/peer/FileDialogPeer.java
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.FileDialog;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link FileDialog}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface FileDialogPeer extends DialogPeer {
|
||||
|
||||
/**
|
||||
* Sets the selected file for this file dialog.
|
||||
*
|
||||
* @param file the file to set as selected file, or {@code null} for
|
||||
* no selected file
|
||||
*
|
||||
* @see FileDialog#setFile(String)
|
||||
*/
|
||||
void setFile(String file);
|
||||
|
||||
/**
|
||||
* Sets the current directory for this file dialog.
|
||||
*
|
||||
* @param dir the directory to set
|
||||
*
|
||||
* @see FileDialog#setDirectory(String)
|
||||
*/
|
||||
void setDirectory(String dir);
|
||||
|
||||
/**
|
||||
* Sets the filename filter for filtering the displayed files.
|
||||
*
|
||||
* @param filter the filter to set
|
||||
*
|
||||
* @see FileDialog#setFilenameFilter(FilenameFilter)
|
||||
*/
|
||||
void setFilenameFilter(FilenameFilter filter);
|
||||
}
|
||||
39
jdkSrc/jdk8/java/awt/peer/FontPeer.java
Normal file
39
jdkSrc/jdk8/java/awt/peer/FontPeer.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 1998, 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 java.awt.peer;
|
||||
|
||||
/**
|
||||
* The peer interface for fonts. This is only a marker interface and not
|
||||
* used by AWT itself.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface FontPeer {
|
||||
}
|
||||
134
jdkSrc/jdk8/java/awt/peer/FramePeer.java
Normal file
134
jdkSrc/jdk8/java/awt/peer/FramePeer.java
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, 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 java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import sun.awt.EmbeddedFrame;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Frame}. This adds a couple of frame specific
|
||||
* methods to the {@link WindowPeer} interface.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface FramePeer extends WindowPeer {
|
||||
|
||||
/**
|
||||
* Sets the title on the frame.
|
||||
*
|
||||
* @param title the title to set
|
||||
*
|
||||
* @see Frame#setTitle(String)
|
||||
*/
|
||||
void setTitle(String title);
|
||||
|
||||
/**
|
||||
* Sets the menu bar for the frame.
|
||||
*
|
||||
* @param mb the menu bar to set
|
||||
*
|
||||
* @see Frame#setMenuBar(MenuBar)
|
||||
*/
|
||||
void setMenuBar(MenuBar mb);
|
||||
|
||||
/**
|
||||
* Sets if the frame should be resizable or not.
|
||||
*
|
||||
* @param resizeable {@code true} when the frame should be resizable,
|
||||
* {@code false} if not
|
||||
*
|
||||
* @see Frame#setResizable(boolean)
|
||||
*/
|
||||
void setResizable(boolean resizeable);
|
||||
|
||||
/**
|
||||
* Changes the state of the frame.
|
||||
*
|
||||
* @param state the new state
|
||||
*
|
||||
* @see Frame#setExtendedState(int)
|
||||
*/
|
||||
void setState(int state);
|
||||
|
||||
/**
|
||||
* Returns the current state of the frame.
|
||||
*
|
||||
* @return the current state of the frame
|
||||
*
|
||||
* @see Frame#getExtendedState()
|
||||
*/
|
||||
int getState();
|
||||
|
||||
/**
|
||||
* Sets the bounds of the frame when it becomes maximized.
|
||||
*
|
||||
* @param bounds the maximized bounds of the frame
|
||||
*
|
||||
* @see Frame#setMaximizedBounds(Rectangle)
|
||||
*/
|
||||
void setMaximizedBounds(Rectangle bounds);
|
||||
|
||||
/**
|
||||
* Sets the size and location for embedded frames. (On embedded frames,
|
||||
* setLocation() and setBounds() always set the frame to (0,0) for
|
||||
* backwards compatibility.
|
||||
*
|
||||
* @param x the X location
|
||||
* @param y the Y location
|
||||
* @param width the width of the frame
|
||||
* @param height the height of the frame
|
||||
*
|
||||
* @see EmbeddedFrame#setBoundsPrivate(int, int, int, int)
|
||||
*/
|
||||
// TODO: This is only used in EmbeddedFrame, and should probably be moved
|
||||
// into an EmbeddedFramePeer which would extend FramePeer
|
||||
void setBoundsPrivate(int x, int y, int width, int height);
|
||||
|
||||
/**
|
||||
* Returns the size and location for embedded frames. (On embedded frames,
|
||||
* setLocation() and setBounds() always set the frame to (0,0) for
|
||||
* backwards compatibility.
|
||||
*
|
||||
* @return the bounds of an embedded frame
|
||||
*
|
||||
* @see EmbeddedFrame#getBoundsPrivate()
|
||||
*/
|
||||
// TODO: This is only used in EmbeddedFrame, and should probably be moved
|
||||
// into an EmbeddedFramePeer which would extend FramePeer
|
||||
Rectangle getBoundsPrivate();
|
||||
|
||||
/**
|
||||
* Requests the peer to emulate window activation.
|
||||
*
|
||||
* @param activate activate or deactivate the window
|
||||
*/
|
||||
void emulateActivation(boolean activate);
|
||||
}
|
||||
80
jdkSrc/jdk8/java/awt/peer/KeyboardFocusManagerPeer.java
Normal file
80
jdkSrc/jdk8/java/awt/peer/KeyboardFocusManagerPeer.java
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Window;
|
||||
|
||||
/**
|
||||
* The native peer interface for {@link KeyboardFocusManager}.
|
||||
*/
|
||||
public interface KeyboardFocusManagerPeer {
|
||||
|
||||
/**
|
||||
* Sets the window that should become the focused window.
|
||||
*
|
||||
* @param win the window that should become the focused window
|
||||
*
|
||||
*/
|
||||
void setCurrentFocusedWindow(Window win);
|
||||
|
||||
/**
|
||||
* Returns the currently focused window.
|
||||
*
|
||||
* @return the currently focused window
|
||||
*
|
||||
* @see KeyboardFocusManager#getNativeFocusedWindow()
|
||||
*/
|
||||
Window getCurrentFocusedWindow();
|
||||
|
||||
/**
|
||||
* Sets the component that should become the focus owner.
|
||||
*
|
||||
* @param comp the component to become the focus owner
|
||||
*
|
||||
* @see KeyboardFocusManager#setNativeFocusOwner(Component)
|
||||
*/
|
||||
void setCurrentFocusOwner(Component comp);
|
||||
|
||||
/**
|
||||
* Returns the component that currently owns the input focus.
|
||||
*
|
||||
* @return the component that currently owns the input focus
|
||||
*
|
||||
* @see KeyboardFocusManager#getNativeFocusOwner()
|
||||
*/
|
||||
Component getCurrentFocusOwner();
|
||||
|
||||
/**
|
||||
* Clears the current global focus owner.
|
||||
*
|
||||
* @param activeWindow
|
||||
*
|
||||
* @see KeyboardFocusManager#clearGlobalFocusOwner()
|
||||
*/
|
||||
void clearGlobalFocusOwner(Window activeWindow);
|
||||
|
||||
}
|
||||
60
jdkSrc/jdk8/java/awt/peer/LabelPeer.java
Normal file
60
jdkSrc/jdk8/java/awt/peer/LabelPeer.java
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Label;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Label}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface LabelPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets the text to be displayed on the label.
|
||||
*
|
||||
* @param label the text to be displayed on the label
|
||||
*
|
||||
* @see Label#setText
|
||||
*/
|
||||
void setText(String label);
|
||||
|
||||
/**
|
||||
* Sets the alignment of the label text.
|
||||
*
|
||||
* @param alignment the alignment of the label text
|
||||
*
|
||||
* @see Label#setAlignment(int)
|
||||
* @see Label#CENTER
|
||||
* @see Label#RIGHT
|
||||
* @see Label#LEFT
|
||||
*/
|
||||
void setAlignment(int alignment);
|
||||
}
|
||||
44
jdkSrc/jdk8/java/awt/peer/LightweightPeer.java
Normal file
44
jdkSrc/jdk8/java/awt/peer/LightweightPeer.java
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 1998, 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 java.awt.peer;
|
||||
|
||||
/**
|
||||
* The LightweightPeer interface marks a component as depending upon
|
||||
* a native container so window related events can be routed to the
|
||||
* component. Since this only applies to components and their
|
||||
* extensions, this interface extends ComponentPeer.
|
||||
* <p>
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*
|
||||
* @author Timothy Prinzing
|
||||
*/
|
||||
public interface LightweightPeer extends ComponentPeer {
|
||||
|
||||
}
|
||||
138
jdkSrc/jdk8/java/awt/peer/ListPeer.java
Normal file
138
jdkSrc/jdk8/java/awt/peer/ListPeer.java
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.List;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link List}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ListPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Returns the indices of the list items that are currently selected.
|
||||
* The returned array is not required to be a copy, the callers of this
|
||||
* method already make sure it is not modified.
|
||||
*
|
||||
* @return the indices of the list items that are currently selected
|
||||
*
|
||||
* @see List#getSelectedIndexes()
|
||||
*/
|
||||
int[] getSelectedIndexes();
|
||||
|
||||
/**
|
||||
* Adds an item to the list at the specified index.
|
||||
*
|
||||
* @param item the item to add to the list
|
||||
* @param index the index where to add the item into the list
|
||||
*
|
||||
* @see List#add(String, int)
|
||||
*/
|
||||
void add(String item, int index);
|
||||
|
||||
/**
|
||||
* Deletes items from the list. All items from start to end should are
|
||||
* deleted, including the item at the start and end indices.
|
||||
*
|
||||
* @param start the first item to be deleted
|
||||
* @param end the last item to be deleted
|
||||
*/
|
||||
void delItems(int start, int end);
|
||||
|
||||
/**
|
||||
* Removes all items from the list.
|
||||
*
|
||||
* @see List#removeAll()
|
||||
*/
|
||||
void removeAll();
|
||||
|
||||
/**
|
||||
* Selects the item at the specified {@code index}.
|
||||
*
|
||||
* @param index the index of the item to select
|
||||
*
|
||||
* @see List#select(int)
|
||||
*/
|
||||
void select(int index);
|
||||
|
||||
/**
|
||||
* De-selects the item at the specified {@code index}.
|
||||
*
|
||||
* @param index the index of the item to de-select
|
||||
*
|
||||
* @see List#deselect(int)
|
||||
*/
|
||||
void deselect(int index);
|
||||
|
||||
/**
|
||||
* Makes sure that the item at the specified {@code index} is visible,
|
||||
* by scrolling the list or similar.
|
||||
*
|
||||
* @param index the index of the item to make visible
|
||||
*
|
||||
* @see List#makeVisible(int)
|
||||
*/
|
||||
void makeVisible(int index);
|
||||
|
||||
/**
|
||||
* Toggles multiple selection mode on or off.
|
||||
*
|
||||
* @param m {@code true} for multiple selection mode,
|
||||
* {@code false} for single selection mode
|
||||
*
|
||||
* @see List#setMultipleMode(boolean)
|
||||
*/
|
||||
void setMultipleMode(boolean m);
|
||||
|
||||
/**
|
||||
* Returns the preferred size for a list with the specified number of rows.
|
||||
*
|
||||
* @param rows the number of rows
|
||||
*
|
||||
* @return the preferred size of the list
|
||||
*
|
||||
* @see List#getPreferredSize(int)
|
||||
*/
|
||||
Dimension getPreferredSize(int rows);
|
||||
|
||||
/**
|
||||
* Returns the minimum size for a list with the specified number of rows.
|
||||
*
|
||||
* @param rows the number of rows
|
||||
*
|
||||
* @return the minimum size of the list
|
||||
*
|
||||
* @see List#getMinimumSize(int)
|
||||
*/
|
||||
Dimension getMinimumSize(int rows);
|
||||
|
||||
}
|
||||
67
jdkSrc/jdk8/java/awt/peer/MenuBarPeer.java
Normal file
67
jdkSrc/jdk8/java/awt/peer/MenuBarPeer.java
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Menu;
|
||||
import java.awt.MenuBar;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link MenuBar}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface MenuBarPeer extends MenuComponentPeer {
|
||||
|
||||
/**
|
||||
* Adds a menu to the menu bar.
|
||||
*
|
||||
* @param m the menu to add
|
||||
*
|
||||
* @see MenuBar#add(Menu)
|
||||
*/
|
||||
void addMenu(Menu m);
|
||||
|
||||
/**
|
||||
* Deletes a menu from the menu bar.
|
||||
*
|
||||
* @param index the index of the menu to remove
|
||||
*
|
||||
* @see MenuBar#remove(int)
|
||||
*/
|
||||
void delMenu(int index);
|
||||
|
||||
/**
|
||||
* Adds a help menu to the menu bar.
|
||||
*
|
||||
* @param m the help menu to add
|
||||
*
|
||||
* @see MenuBar#setHelpMenu(Menu)
|
||||
*/
|
||||
void addHelpMenu(Menu m);
|
||||
}
|
||||
57
jdkSrc/jdk8/java/awt/peer/MenuComponentPeer.java
Normal file
57
jdkSrc/jdk8/java/awt/peer/MenuComponentPeer.java
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2003, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.MenuComponent;
|
||||
|
||||
/**
|
||||
* The base interface for all kinds of menu components. This is used by
|
||||
* {@link MenuComponent}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface MenuComponentPeer {
|
||||
|
||||
/**
|
||||
* Disposes the menu component.
|
||||
*
|
||||
* @see MenuComponent#removeNotify()
|
||||
*/
|
||||
void dispose();
|
||||
|
||||
/**
|
||||
* Sets the font for the menu component.
|
||||
*
|
||||
* @param f the font to use for the menu component
|
||||
*
|
||||
* @see MenuComponent#setFont(Font)
|
||||
*/
|
||||
void setFont(Font f);
|
||||
}
|
||||
55
jdkSrc/jdk8/java/awt/peer/MenuItemPeer.java
Normal file
55
jdkSrc/jdk8/java/awt/peer/MenuItemPeer.java
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.MenuItem;
|
||||
|
||||
/**
|
||||
* The peer interface for menu items. This is used by {@link MenuItem}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface MenuItemPeer extends MenuComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets the label to be displayed in this menu item.
|
||||
*
|
||||
* @param label the label to be displayed
|
||||
*/
|
||||
void setLabel(String label);
|
||||
|
||||
/**
|
||||
* Enables or disables the menu item.
|
||||
*
|
||||
* @param e {@code true} to enable the menu item, {@code false}
|
||||
* to disable it
|
||||
*/
|
||||
void setEnabled(boolean e);
|
||||
|
||||
}
|
||||
65
jdkSrc/jdk8/java/awt/peer/MenuPeer.java
Normal file
65
jdkSrc/jdk8/java/awt/peer/MenuPeer.java
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Menu;
|
||||
import java.awt.MenuItem;
|
||||
|
||||
/**
|
||||
* The peer interface for menus. This is used by {@link Menu}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface MenuPeer extends MenuItemPeer {
|
||||
|
||||
/**
|
||||
* Adds a separator (e.g. a horizontal line or similar) to the menu.
|
||||
*
|
||||
* @see Menu#addSeparator()
|
||||
*/
|
||||
void addSeparator();
|
||||
|
||||
/**
|
||||
* Adds the specified menu item to the menu.
|
||||
*
|
||||
* @param item the menu item to add
|
||||
*
|
||||
* @see Menu#add(MenuItem)
|
||||
*/
|
||||
void addItem(MenuItem item);
|
||||
|
||||
/**
|
||||
* Removes the menu item at the specified index.
|
||||
*
|
||||
* @param index the index of the item to remove
|
||||
*
|
||||
* @see Menu#remove(int)
|
||||
*/
|
||||
void delItem(int index);
|
||||
}
|
||||
69
jdkSrc/jdk8/java/awt/peer/MouseInfoPeer.java
Normal file
69
jdkSrc/jdk8/java/awt/peer/MouseInfoPeer.java
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Window;
|
||||
import java.awt.Point;
|
||||
|
||||
/**
|
||||
* Peer interface for {@link MouseInfo}. This is used to get some additional
|
||||
* information about the mouse.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface MouseInfoPeer {
|
||||
|
||||
/**
|
||||
* This method does two things: it fills the point fields with
|
||||
* the current coordinates of the mouse cursor and returns the
|
||||
* number of the screen device where the pointer is located.
|
||||
* The number of the screen device is only returned for independent
|
||||
* devices (which are not parts of a virtual screen device).
|
||||
* For virtual screen devices, 0 is returned.
|
||||
* Mouse coordinates are also calculated depending on whether
|
||||
* or not the screen device is virtual. For virtual screen
|
||||
* devices, pointer coordinates are calculated in the virtual
|
||||
* coordinate system. Otherwise, coordinates are calculated in
|
||||
* the coordinate system of the screen device where the pointer
|
||||
* is located.
|
||||
* See java.awt.GraphicsConfiguration documentation for more
|
||||
* details about virtual screen devices.
|
||||
*/
|
||||
int fillPointWithCoords(Point point);
|
||||
|
||||
/**
|
||||
* Returns whether or not the window is located under the mouse
|
||||
* pointer. The window is considered to be under the mouse pointer
|
||||
* if it is showing on the screen, and the mouse pointer is above
|
||||
* the part of the window that is not obscured by any other windows.
|
||||
*/
|
||||
boolean isWindowUnderMouse(Window w);
|
||||
|
||||
}
|
||||
39
jdkSrc/jdk8/java/awt/peer/PanelPeer.java
Normal file
39
jdkSrc/jdk8/java/awt/peer/PanelPeer.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2007, 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 java.awt.peer;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Panel}. This is a subinterface of
|
||||
* ContainerPeer and does not declare any additional methods because a Panel
|
||||
* is just that, a concrete Container.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface PanelPeer extends ContainerPeer {
|
||||
}
|
||||
50
jdkSrc/jdk8/java/awt/peer/PopupMenuPeer.java
Normal file
50
jdkSrc/jdk8/java/awt/peer/PopupMenuPeer.java
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Event;
|
||||
import java.awt.PopupMenu;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link PopupMenu}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface PopupMenuPeer extends MenuPeer {
|
||||
|
||||
/**
|
||||
* Shows the popup menu.
|
||||
*
|
||||
* @param e a synthetic event describing the origin and location of the
|
||||
* popup menu
|
||||
*
|
||||
* @see PopupMenu#show(java.awt.Component, int, int)
|
||||
*/
|
||||
void show(Event e);
|
||||
}
|
||||
124
jdkSrc/jdk8/java/awt/peer/RobotPeer.java
Normal file
124
jdkSrc/jdk8/java/awt/peer/RobotPeer.java
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2008, 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 java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* RobotPeer defines an interface whereby toolkits support automated testing
|
||||
* by allowing native input events to be generated from Java code.
|
||||
*
|
||||
* This interface should not be directly imported by code outside the
|
||||
* java.awt.* hierarchy; it is not to be considered public and is subject
|
||||
* to change.
|
||||
*
|
||||
* @author Robi Khan
|
||||
*/
|
||||
public interface RobotPeer
|
||||
{
|
||||
/**
|
||||
* Moves the mouse pointer to the specified screen location.
|
||||
*
|
||||
* @param x the X location on screen
|
||||
* @param y the Y location on screen
|
||||
*
|
||||
* @see Robot#mouseMove(int, int)
|
||||
*/
|
||||
void mouseMove(int x, int y);
|
||||
|
||||
/**
|
||||
* Simulates a mouse press with the specified button(s).
|
||||
*
|
||||
* @param buttons the button mask
|
||||
*
|
||||
* @see Robot#mousePress(int)
|
||||
*/
|
||||
void mousePress(int buttons);
|
||||
|
||||
/**
|
||||
* Simulates a mouse release with the specified button(s).
|
||||
*
|
||||
* @param buttons the button mask
|
||||
*
|
||||
* @see Robot#mouseRelease(int)
|
||||
*/
|
||||
void mouseRelease(int buttons);
|
||||
|
||||
/**
|
||||
* Simulates mouse wheel action.
|
||||
*
|
||||
* @param wheelAmt number of notches to move the mouse wheel
|
||||
*
|
||||
* @see Robot#mouseWheel(int)
|
||||
*/
|
||||
void mouseWheel(int wheelAmt);
|
||||
|
||||
/**
|
||||
* Simulates a key press of the specified key.
|
||||
*
|
||||
* @param keycode the key code to press
|
||||
*
|
||||
* @see Robot#keyPress(int)
|
||||
*/
|
||||
void keyPress(int keycode);
|
||||
|
||||
/**
|
||||
* Simulates a key release of the specified key.
|
||||
*
|
||||
* @param keycode the key code to release
|
||||
*
|
||||
* @see Robot#keyRelease(int)
|
||||
*/
|
||||
void keyRelease(int keycode);
|
||||
|
||||
/**
|
||||
* Gets the RGB value of the specified pixel on screen.
|
||||
*
|
||||
* @param x the X screen coordinate
|
||||
* @param y the Y screen coordinate
|
||||
*
|
||||
* @return the RGB value of the specified pixel on screen
|
||||
*
|
||||
* @see Robot#getPixelColor(int, int)
|
||||
*/
|
||||
int getRGBPixel(int x, int y);
|
||||
|
||||
/**
|
||||
* Gets the RGB values of the specified screen area as an array.
|
||||
*
|
||||
* @param bounds the screen area to capture the RGB values from
|
||||
*
|
||||
* @return the RGB values of the specified screen area
|
||||
*
|
||||
* @see Robot#createScreenCapture(Rectangle)
|
||||
*/
|
||||
int[] getRGBPixels(Rectangle bounds);
|
||||
|
||||
/**
|
||||
* Disposes the robot peer when it is not needed anymore.
|
||||
*/
|
||||
void dispose();
|
||||
}
|
||||
97
jdkSrc/jdk8/java/awt/peer/ScrollPanePeer.java
Normal file
97
jdkSrc/jdk8/java/awt/peer/ScrollPanePeer.java
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Adjustable;
|
||||
import java.awt.ScrollPane;
|
||||
import java.awt.ScrollPaneAdjustable;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link ScrollPane}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ScrollPanePeer extends ContainerPeer {
|
||||
|
||||
/**
|
||||
* Returns the height of the horizontal scroll bar.
|
||||
*
|
||||
* @return the height of the horizontal scroll bar
|
||||
*
|
||||
* @see ScrollPane#getHScrollbarHeight()
|
||||
*/
|
||||
int getHScrollbarHeight();
|
||||
|
||||
/**
|
||||
* Returns the width of the vertical scroll bar.
|
||||
*
|
||||
* @return the width of the vertical scroll bar
|
||||
*
|
||||
* @see ScrollPane#getVScrollbarWidth()
|
||||
*/
|
||||
int getVScrollbarWidth();
|
||||
|
||||
/**
|
||||
* Sets the scroll position of the child.
|
||||
*
|
||||
* @param x the X coordinate of the scroll position
|
||||
* @param y the Y coordinate of the scroll position
|
||||
*
|
||||
* @see ScrollPane#setScrollPosition(int, int)
|
||||
*/
|
||||
void setScrollPosition(int x, int y);
|
||||
|
||||
/**
|
||||
* Called when the child component changes its size.
|
||||
*
|
||||
* @param w the new width of the child component
|
||||
* @param h the new height of the child component
|
||||
*
|
||||
* @see ScrollPane#layout()
|
||||
*/
|
||||
void childResized(int w, int h);
|
||||
|
||||
/**
|
||||
* Sets the unit increment of one of the scroll pane's adjustables.
|
||||
*
|
||||
* @param adj the scroll pane adjustable object
|
||||
* @param u the unit increment
|
||||
*
|
||||
* @see ScrollPaneAdjustable#setUnitIncrement(int)
|
||||
*/
|
||||
void setUnitIncrement(Adjustable adj, int u);
|
||||
|
||||
/**
|
||||
* Sets the value for one of the scroll pane's adjustables.
|
||||
*
|
||||
* @param adj the scroll pane adjustable object
|
||||
* @param v the value to set
|
||||
*/
|
||||
void setValue(Adjustable adj, int v);
|
||||
}
|
||||
69
jdkSrc/jdk8/java/awt/peer/ScrollbarPeer.java
Normal file
69
jdkSrc/jdk8/java/awt/peer/ScrollbarPeer.java
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Scrollbar;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Scrollbar}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface ScrollbarPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets the parameters for the scrollbar.
|
||||
*
|
||||
* @param value the current value
|
||||
* @param visible how much of the whole scale is visible
|
||||
* @param minimum the minimum value
|
||||
* @param maximum the maximum value
|
||||
*
|
||||
* @see Scrollbar#setValues(int, int, int, int)
|
||||
*/
|
||||
void setValues(int value, int visible, int minimum, int maximum);
|
||||
|
||||
/**
|
||||
* Sets the line increment of the scrollbar.
|
||||
*
|
||||
* @param l the line increment
|
||||
*
|
||||
* @see Scrollbar#setLineIncrement(int)
|
||||
*/
|
||||
void setLineIncrement(int l);
|
||||
|
||||
/**
|
||||
* Sets the page increment of the scrollbar.
|
||||
*
|
||||
* @param l the page increment
|
||||
*
|
||||
* @see Scrollbar#setPageIncrement(int)
|
||||
*/
|
||||
void setPageIncrement(int l);
|
||||
}
|
||||
45
jdkSrc/jdk8/java/awt/peer/SystemTrayPeer.java
Normal file
45
jdkSrc/jdk8/java/awt/peer/SystemTrayPeer.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.SystemTray;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link SystemTray}. This doesn't need to be
|
||||
* implemented if {@link SystemTray#isSupported()} returns false.
|
||||
*/
|
||||
public interface SystemTrayPeer {
|
||||
|
||||
/**
|
||||
* Returns the size of the system tray icon.
|
||||
*
|
||||
* @return the size of the system tray icon
|
||||
*
|
||||
* @see SystemTray#getTrayIconSize()
|
||||
*/
|
||||
Dimension getTrayIconSize();
|
||||
}
|
||||
88
jdkSrc/jdk8/java/awt/peer/TextAreaPeer.java
Normal file
88
jdkSrc/jdk8/java/awt/peer/TextAreaPeer.java
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.TextArea;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link TexTArea}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface TextAreaPeer extends TextComponentPeer {
|
||||
|
||||
/**
|
||||
* Inserts the specified text at the specified position in the document.
|
||||
*
|
||||
* @param text the text to insert
|
||||
* @param pos the position to insert
|
||||
*
|
||||
* @see TextArea#insert(String, int)
|
||||
*/
|
||||
void insert(String text, int pos);
|
||||
|
||||
/**
|
||||
* Replaces a range of text by the specified string.
|
||||
*
|
||||
* @param text the replacement string
|
||||
* @param start the begin of the range to replace
|
||||
* @param end the end of the range to replace
|
||||
*
|
||||
* @see TextArea#replaceRange(String, int, int)
|
||||
*/
|
||||
void replaceRange(String text, int start, int end);
|
||||
|
||||
/**
|
||||
* Returns the preferred size of a textarea with the specified number of
|
||||
* columns and rows.
|
||||
*
|
||||
* @param rows the number of rows
|
||||
* @param columns the number of columns
|
||||
*
|
||||
* @return the preferred size of a textarea
|
||||
*
|
||||
* @see TextArea#getPreferredSize(int, int)
|
||||
*/
|
||||
Dimension getPreferredSize(int rows, int columns);
|
||||
|
||||
/**
|
||||
* Returns the minimum size of a textarea with the specified number of
|
||||
* columns and rows.
|
||||
*
|
||||
* @param rows the number of rows
|
||||
* @param columns the number of columns
|
||||
*
|
||||
* @return the minimum size of a textarea
|
||||
*
|
||||
* @see TextArea#getMinimumSize(int, int)
|
||||
*/
|
||||
Dimension getMinimumSize(int rows, int columns);
|
||||
|
||||
}
|
||||
121
jdkSrc/jdk8/java/awt/peer/TextComponentPeer.java
Normal file
121
jdkSrc/jdk8/java/awt/peer/TextComponentPeer.java
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, 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 java.awt.peer;
|
||||
|
||||
import java.awt.TextComponent;
|
||||
import java.awt.im.InputMethodRequests;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link TextComponent}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface TextComponentPeer extends ComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets if the text component should be editable or not.
|
||||
*
|
||||
* @param editable {@code true} for editable text components,
|
||||
* {@code false} for non-editable text components
|
||||
*
|
||||
* @see TextComponent#setEditable(boolean)
|
||||
*/
|
||||
void setEditable(boolean editable);
|
||||
|
||||
/**
|
||||
* Returns the current content of the text component.
|
||||
*
|
||||
* @return the current content of the text component
|
||||
*
|
||||
* @see TextComponent#getText()
|
||||
*/
|
||||
String getText();
|
||||
|
||||
/**
|
||||
* Sets the content for the text component.
|
||||
*
|
||||
* @param text the content to set
|
||||
*
|
||||
* @see TextComponent#setText(String)
|
||||
*/
|
||||
void setText(String text);
|
||||
|
||||
/**
|
||||
* Returns the start index of the current selection.
|
||||
*
|
||||
* @return the start index of the current selection
|
||||
*
|
||||
* @see TextComponent#getSelectionStart()
|
||||
*/
|
||||
int getSelectionStart();
|
||||
|
||||
/**
|
||||
* Returns the end index of the current selection.
|
||||
*
|
||||
* @return the end index of the current selection
|
||||
*
|
||||
* @see TextComponent#getSelectionEnd()
|
||||
*/
|
||||
int getSelectionEnd();
|
||||
|
||||
/**
|
||||
* Selects an area of the text component.
|
||||
*
|
||||
* @param selStart the start index of the new selection
|
||||
* @param selEnd the end index of the new selection
|
||||
*
|
||||
* @see TextComponent#select(int, int)
|
||||
*/
|
||||
void select(int selStart, int selEnd);
|
||||
|
||||
/**
|
||||
* Sets the caret position of the text component.
|
||||
*
|
||||
* @param pos the caret position to set
|
||||
*
|
||||
* @see TextComponent#setCaretPosition(int)
|
||||
*/
|
||||
void setCaretPosition(int pos);
|
||||
|
||||
/**
|
||||
* Returns the current caret position.
|
||||
*
|
||||
* @return the current caret position
|
||||
*
|
||||
* @see TextComponent#getCaretPosition()
|
||||
*/
|
||||
int getCaretPosition();
|
||||
|
||||
/**
|
||||
* Returns the input method requests.
|
||||
*
|
||||
* @return the input method requests
|
||||
*/
|
||||
InputMethodRequests getInputMethodRequests();
|
||||
}
|
||||
74
jdkSrc/jdk8/java/awt/peer/TextFieldPeer.java
Normal file
74
jdkSrc/jdk8/java/awt/peer/TextFieldPeer.java
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1998, 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 java.awt.peer;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.TextField;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link TextField}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface TextFieldPeer extends TextComponentPeer {
|
||||
|
||||
/**
|
||||
* Sets the echo character.
|
||||
*
|
||||
* @param echoChar the echo character to set
|
||||
*
|
||||
* @see TextField#getEchoChar()
|
||||
*/
|
||||
void setEchoChar(char echoChar);
|
||||
|
||||
/**
|
||||
* Returns the preferred size of the text field with the specified number
|
||||
* of columns.
|
||||
*
|
||||
* @param columns the number of columns
|
||||
*
|
||||
* @return the preferred size of the text field
|
||||
*
|
||||
* @see TextField#getPreferredSize(int)
|
||||
*/
|
||||
Dimension getPreferredSize(int columns);
|
||||
|
||||
/**
|
||||
* Returns the minimum size of the text field with the specified number
|
||||
* of columns.
|
||||
*
|
||||
* @param columns the number of columns
|
||||
*
|
||||
* @return the minimum size of the text field
|
||||
*
|
||||
* @see TextField#getMinimumSize(int)
|
||||
*/
|
||||
Dimension getMinimumSize(int columns);
|
||||
|
||||
}
|
||||
80
jdkSrc/jdk8/java/awt/peer/TrayIconPeer.java
Normal file
80
jdkSrc/jdk8/java/awt/peer/TrayIconPeer.java
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2007, 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 java.awt.peer;
|
||||
|
||||
import java.awt.SystemTray;
|
||||
import java.awt.TrayIcon;
|
||||
|
||||
/**
|
||||
* The peer interface for the {@link TrayIcon}. This doesn't need to be
|
||||
* implemented if {@link SystemTray#isSupported()} returns false.
|
||||
*/
|
||||
public interface TrayIconPeer {
|
||||
|
||||
/**
|
||||
* Disposes the tray icon and releases and resources held by it.
|
||||
*
|
||||
* @see TrayIcon#removeNotify()
|
||||
*/
|
||||
void dispose();
|
||||
|
||||
/**
|
||||
* Sets the tool tip for the tray icon.
|
||||
*
|
||||
* @param tooltip the tooltip to set
|
||||
*
|
||||
* @see TrayIcon#setToolTip(String)
|
||||
*/
|
||||
void setToolTip(String tooltip);
|
||||
|
||||
/**
|
||||
* Updates the icon image. This is supposed to display the current icon
|
||||
* from the TrayIcon component in the actual tray icon.
|
||||
*
|
||||
* @see TrayIcon#setImage(java.awt.Image)
|
||||
* @see TrayIcon#setImageAutoSize(boolean)
|
||||
*/
|
||||
void updateImage();
|
||||
|
||||
/**
|
||||
* Displays a message at the tray icon.
|
||||
*
|
||||
* @param caption the message caption
|
||||
* @param text the actual message text
|
||||
* @param messageType the message type
|
||||
*
|
||||
* @see TrayIcon#displayMessage(String, String, java.awt.TrayIcon.MessageType)
|
||||
*/
|
||||
void displayMessage(String caption, String text, String messageType);
|
||||
|
||||
/**
|
||||
* Shows the popup menu of this tray icon at the specified position.
|
||||
*
|
||||
* @param x the X location for the popup menu
|
||||
* @param y the Y location for the popup menu
|
||||
*/
|
||||
void showPopupMenu(int x, int y);
|
||||
}
|
||||
120
jdkSrc/jdk8/java/awt/peer/WindowPeer.java
Normal file
120
jdkSrc/jdk8/java/awt/peer/WindowPeer.java
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, 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 java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* The peer interface for {@link Window}.
|
||||
*
|
||||
* The peer interfaces are intended only for use in porting
|
||||
* the AWT. They are not intended for use by application
|
||||
* developers, and developers should not implement peers
|
||||
* nor invoke any of the peer methods directly on the peer
|
||||
* instances.
|
||||
*/
|
||||
public interface WindowPeer extends ContainerPeer {
|
||||
|
||||
/**
|
||||
* Makes this window the topmost window on the desktop.
|
||||
*
|
||||
* @see Window#toFront()
|
||||
*/
|
||||
void toFront();
|
||||
|
||||
/**
|
||||
* Makes this window the bottommost window on the desktop.
|
||||
*
|
||||
* @see Window#toBack()
|
||||
*/
|
||||
void toBack();
|
||||
|
||||
/**
|
||||
* Updates the window's always-on-top state.
|
||||
* Sets if the window should always stay
|
||||
* on top of all other windows or not.
|
||||
*
|
||||
* @see Window#getAlwaysOnTop()
|
||||
* @see Window#setAlwaysOnTop(boolean)
|
||||
*/
|
||||
void updateAlwaysOnTopState();
|
||||
|
||||
/**
|
||||
* Updates the window's focusable state.
|
||||
*
|
||||
* @see Window#setFocusableWindowState(boolean)
|
||||
*/
|
||||
void updateFocusableWindowState();
|
||||
|
||||
/**
|
||||
* Sets if this window is blocked by a modal dialog or not.
|
||||
*
|
||||
* @param blocker the blocking modal dialog
|
||||
* @param blocked {@code true} to block the window, {@code false}
|
||||
* to unblock it
|
||||
*/
|
||||
void setModalBlocked(Dialog blocker, boolean blocked);
|
||||
|
||||
/**
|
||||
* Updates the minimum size on the peer.
|
||||
*
|
||||
* @see Window#setMinimumSize(Dimension)
|
||||
*/
|
||||
void updateMinimumSize();
|
||||
|
||||
/**
|
||||
* Updates the icons for the window.
|
||||
*
|
||||
* @see Window#setIconImages(java.util.List)
|
||||
*/
|
||||
void updateIconImages();
|
||||
|
||||
/**
|
||||
* Sets the level of opacity for the window.
|
||||
*
|
||||
* @see Window#setOpacity(float)
|
||||
*/
|
||||
void setOpacity(float opacity);
|
||||
|
||||
/**
|
||||
* Enables the per-pixel alpha support for the window.
|
||||
*
|
||||
* @see Window#setBackground(Color)
|
||||
*/
|
||||
void setOpaque(boolean isOpaque);
|
||||
|
||||
/**
|
||||
* Updates the native part of non-opaque window.
|
||||
*
|
||||
* @see Window#setBackground(Color)
|
||||
*/
|
||||
void updateWindow();
|
||||
|
||||
/**
|
||||
* Instructs the peer to update the position of the security warning.
|
||||
*/
|
||||
void repositionSecurityWarning();
|
||||
}
|
||||
Reference in New Issue
Block a user