下面列出了java.awt.peer.FramePeer#setMaximizedBounds ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getComponentFactory().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Makes this Frame displayable by connecting it to
* a native screen resource. Making a frame displayable will
* cause any of its children to be made displayable.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* @see Component#isDisplayable
* @see #removeNotify
*/
public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If {@code bounds} is {@code null}, accept bounds
* supplied by the system. If non-{@code null} you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to {@code Integer.MAX_VALUE}.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If {@code bounds} is {@code null}, accept bounds
* supplied by the system. If non-{@code null} you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to {@code Integer.MAX_VALUE}.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}
/**
* Sets the maximized bounds for this frame.
* <p>
* When a frame is in maximized state the system supplies some
* defaults bounds. This method allows some or all of those
* system supplied values to be overridden.
* <p>
* If <code>bounds</code> is <code>null</code>, accept bounds
* supplied by the system. If non-<code>null</code> you can
* override some of the system supplied values while accepting
* others by setting those fields you want to accept from system
* to <code>Integer.MAX_VALUE</code>.
* <p>
* Note, the given maximized bounds are used as a hint for the native
* system, because the underlying platform may not support setting the
* location and/or size of the maximized windows. If that is the case, the
* provided values do not affect the appearance of the frame in the
* maximized state.
*
* @param bounds bounds for the maximized state
* @see #getMaximizedBounds()
* @since 1.4
*/
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
}
}