1 /*
2 * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
118 * {@code setLocation} on a {@code Window},
119 * {@code Frame} or {@code Dialog} are forwarded
120 * to the underlying window management system and may be
121 * ignored or modified. See {@link java.awt.Window} for
122 * more information.
123 * </ul>
124 * <p>
125 * Most applications should not call any of the methods in this
126 * class directly. The methods defined by {@code Toolkit} are
127 * the "glue" that joins the platform-independent classes in the
128 * {@code java.awt} package with their counterparts in
129 * {@code java.awt.peer}. Some methods defined by
130 * {@code Toolkit} query the native operating system directly.
131 *
132 * @author Sami Shaio
133 * @author Arthur van Hoff
134 * @author Fred Ecks
135 * @since 1.0
136 */
137 public abstract class Toolkit {
138
139 // The following method is called by the private method
140 // <code>updateSystemColors</code> in <code>SystemColor</code>.
141
142 /**
143 * Fills in the integer array that is supplied as an argument
144 * with the current system color values.
145 *
146 * @param systemColors an integer array.
147 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
148 * returns true
149 * @see java.awt.GraphicsEnvironment#isHeadless
150 * @since 1.1
151 */
152 protected void loadSystemColors(int[] systemColors)
153 throws HeadlessException {
154 GraphicsEnvironment.checkHeadless();
155 }
156
157 /**
|
1 /*
2 * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
118 * {@code setLocation} on a {@code Window},
119 * {@code Frame} or {@code Dialog} are forwarded
120 * to the underlying window management system and may be
121 * ignored or modified. See {@link java.awt.Window} for
122 * more information.
123 * </ul>
124 * <p>
125 * Most applications should not call any of the methods in this
126 * class directly. The methods defined by {@code Toolkit} are
127 * the "glue" that joins the platform-independent classes in the
128 * {@code java.awt} package with their counterparts in
129 * {@code java.awt.peer}. Some methods defined by
130 * {@code Toolkit} query the native operating system directly.
131 *
132 * @author Sami Shaio
133 * @author Arthur van Hoff
134 * @author Fred Ecks
135 * @since 1.0
136 */
137 public abstract class Toolkit {
138
139 /**
140 * Constructs a {@code Toolkit}.
141 */
142 protected Toolkit() {}
143
144 // The following method is called by the private method
145 // <code>updateSystemColors</code> in <code>SystemColor</code>.
146
147 /**
148 * Fills in the integer array that is supplied as an argument
149 * with the current system color values.
150 *
151 * @param systemColors an integer array.
152 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
153 * returns true
154 * @see java.awt.GraphicsEnvironment#isHeadless
155 * @since 1.1
156 */
157 protected void loadSystemColors(int[] systemColors)
158 throws HeadlessException {
159 GraphicsEnvironment.checkHeadless();
160 }
161
162 /**
|