Source Code Cross Referenced for GraphicsConfigTemplate.java in  » 6.0-JDK-Core » AWT » java » awt » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025
026        package java.awt;
027
028        import java.io.*;
029
030        /**
031         * The <code>GraphicsConfigTemplate</code> class is used to obtain a valid
032         * {@link GraphicsConfiguration}.  A user instantiates one of these
033         * objects and then sets all non-default attributes as desired.  The
034         * {@link GraphicsDevice#getBestConfiguration} method found in the
035         * {@link GraphicsDevice} class is then called with this
036         * <code>GraphicsConfigTemplate</code>.  A valid 
037         * <code>GraphicsConfiguration</code> is returned that meets or exceeds
038         * what was requested in the <code>GraphicsConfigTemplate</code>.
039         * @see GraphicsDevice
040         * @see GraphicsConfiguration
041         *
042         * @version 	1.26, 06/05/07
043         * @since       1.2
044         */
045        public abstract class GraphicsConfigTemplate implements  Serializable {
046            /*
047             * serialVersionUID
048             */
049            private static final long serialVersionUID = -8061369279557787079L;
050
051            /**
052             * This class is an abstract class so only subclasses can be
053             * instantiated.
054             */
055            public GraphicsConfigTemplate() {
056            }
057
058            /**
059             * Value used for "Enum" (Integer) type.  States that this
060             * feature is required for the <code>GraphicsConfiguration</code> 
061             * object.  If this feature is not available, do not select the
062             * <code>GraphicsConfiguration</code> object.
063             */
064            public static final int REQUIRED = 1;
065
066            /**
067             * Value used for "Enum" (Integer) type.  States that this
068             * feature is desired for the <code>GraphicsConfiguration</code> 
069             * object.  A selection with this feature is preferred over a
070             * selection that does not include this feature, although both
071             * selections can be considered valid matches.
072             */
073            public static final int PREFERRED = 2;
074
075            /**
076             * Value used for "Enum" (Integer) type.  States that this
077             * feature is not necessary for the selection of the
078             * <code>GraphicsConfiguration</code> object.  A selection
079             * without this feature is preferred over a selection that
080             * includes this feature since it is not used. 
081             */
082            public static final int UNNECESSARY = 3;
083
084            /**
085             * Returns the "best" configuration possible that passes the
086             * criteria defined in the <code>GraphicsConfigTemplate</code>.
087             * @param gc the array of <code>GraphicsConfiguration</code>
088             * objects to choose from.
089             * @return a <code>GraphicsConfiguration</code> object that is
090             * the best configuration possible.
091             * @see GraphicsConfiguration
092             */
093            public abstract GraphicsConfiguration getBestConfiguration(
094                    GraphicsConfiguration[] gc);
095
096            /**
097             * Returns a <code>boolean</code> indicating whether or 
098             * not the specified <code>GraphicsConfiguration</code> can be 
099             * used to create a drawing surface that supports the indicated
100             * features.
101             * @param gc the <code>GraphicsConfiguration</code> object to test
102             * @return <code>true</code> if this 
103             * <code>GraphicsConfiguration</code> object can be used to create
104             * surfaces that support the indicated features; 
105             * <code>false</code> if the <code>GraphicsConfiguration</code> can
106             * not be used to create a drawing surface usable by this Java(tm)
107             * API.
108             */
109            public abstract boolean isGraphicsConfigSupported(
110                    GraphicsConfiguration gc);
111
112        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.