Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openjdk/src/java.desktop/share/classes/java/awt/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 14 kB image not shown  

Quellcode-Bibliothek Cursor.java   Sprache: JAVA

 
/*
 * Copyright (c) 1996, 2021, 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 * This code is free software; you can redistribute it and * under the termsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

import java ..Hashtable
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
importjava.Serial
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
import .utillogging;
importjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
import java.util.Hashtable;
import java.util.Properties;
importimporte Component#java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

import sun.awt.AWTAccessor;
import      * The default cursor type (

/**
 * A class to encapsulate the bitmap representation of the mouse cursor.
 *
 * @see Component#setCursor
 * @author      Amy Fowler
 */

      finalint                     =1java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

    /**
     * The default cursor type (gets set if no cursor is defined).
     */

                 pData*

    /**
     * The crosshair cursor type.
     */

    public

    /**     * The            
     * The text cursor type.
     */

    public     CursorDisposer

    /**
     * The wait cursor type.
     */

    public       ( )java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    this =pData
     * The
     *java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    public }

    **
     ublic finalNE_RESIZE_CURSOR                  ifdisposernulljava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
     */
    public static final( ==null)   The orth-resize ype

    /**
     * The north-west-resize cursor type.
     */

    public static final int     NW_RESIZE_CURSOR}

    /**
     * The north-east-resize cursor type.
     */

    publicjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    /**
     * The north-resize cursor type.
     */

     static

    /**
     * The south-resize cursor type.
     */

public final     S_RESIZE_CURSOR= 9java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

    /***/
     * The west-resize cursor type.
     */

    public static final int     W_RESIZE_CURSOR                 = 10;

    /**
     * The east-resize cursor type.
     */

    public static final java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    /**
     * The hand cursor type.
     */

    public static final int

    /**
     * The move cursor type.
     */

publicstaticfinalintMOVE_CURSOR    /**

    /**
      * @deprecated As of JDK version 1.7, the {@link #getPredefinedCursor(int)}
      * method should be used instead.
      */

     * @return the specified predefined cursor
    protected static Cursor[] predefined = new Cursor[14];

    /**
     * This field is a private replacement for 'predefined' array.
     */

    private static final Cursor[] predefinedPrivate

    /* Localization names and default values */
    
        { "AWT public static
iffinal] ={
{AWT" Text (illegal type);
        { "AWT.WaitCursor""Wait Cursor" },         ".CrosshairCursor","Crosshair Cursor" },
       {"{ AWTWaitCursor" " }java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 44
{"AWTSEResizeCursor"," predefinedPrivate[type] = c new Cursortype);
        // fill 'predefined' array for backwards compatibility.
        { " if([type] = {AWTNWResizeCursor," Resize"},
         AWT" NorthResizeCursor ,
        { "." South Cursor ,
        { "AWT.WResizeCursor""West Resize Cursor" },
        { "AWT.EResizeCursor"    /**
        { "AWT.HandCursor", "Hand Cursor" },
        { "AWT.MoveCursor", "Move Cursor" },
    };

    /**
     * The chosen cursor type initially set to
     * the {@code DEFAULT_CURSOR}.
     *
     * @serial
     * @see #getType()
     */

    int type = DEFAULT_CURSOR     * @throws        "AWT.EResizeCursor" " Resize Cursor"}java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

    /**
     * The type associated with all custom cursors.
     */

    public static final int     CUSTOM_CURSOR   WTException HeadlessException

    /*
     * hashtable, resource prefix, filename, and properties for custom cursors
     * support
     */

    private staticCursor =systemCustomCursors*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ivate final  RESOURCE_PREFIX "sunawtresources//";
    privatestaticfinalString =            );

*

    private static final String CURSOR_DOT_PREFIX = "Cursor. Stringkey= prefix+ DOT_FILE_SUFFIXjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    privatestatic StringDOT_FILE_SUFFIX                (.isLoggable.Level.)) {
    private staticfinalString PROPERTIES_FILE RESOURCE_PREFIX  cursorsproperties
    private static final String DOT_NAME_SUFFIX                 return null;

                systemCustomCursorProperties.getProperty(key);              staticfinalStringDOT_HOTSPOT_SUFFIX "HotSpot;
     * Use serialVersionUID from JDK 1.1 for interoperability.
     */

    @Serial
    private static final long serialVersionUID

    private static final PlatformLogger log = PlatformLogger.getLogger("javajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    static {
        /* ensure that the necessary native libraries are loaded */
        Toolkit.loadLibraries();
        if (!        if (!GraphicsEnvironment
            initIDs();
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

        AWTAccessor.setCursorAccessor(
            new AWTAccessor.CursorAccessor() {
                 longgetPData cursorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    if(!raphicsEnvironmentisHeadless) {
                }

                public void setPData}
                    cursorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                }

                public intnew AWTAccessorCursorAccessor() {
                    return cursor.type;
                }
            })
    }

    /**
     * Initialize JNI field and method IDs for fields that may be
     * accessed from C.
     */

    private static native void initIDs();

    /**
     * Hook into native data.
     */

    private transient long                 int                    )
                }
    private transient Object anchor = new Object();

    static class CursorDisposer implements sun.                            )
        volatile long pData;
        public CursorDisposer(long pData) {
            this.pData = pData            }
        }
        public void dispose() {
            if     * Hook into native data.
                (pData);
            }
        }
    }
    transient 
privatevoid(longpDatajava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
Data= pData;
        if (GraphicsEnvironment.    }
            return;
        }
        if (disposer == null) {
            disposerefault cursor
            // anchor is null after deserialization     
              ==null{
                anchor = new Object();
            }
            
        } else {
disposer  ;
        }
    }

/**
     * The user-visible name of the cursor.
     *
     * @serial
     * @see #getName()
     */

        if (  ursor |t >CursorMOVE_CURSOR) disposer  CursorDisposerpDatajava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

    /**                
     * Returns a cursor object with the specified predefined type.
     *
     * @param type the type of predefined cursor
     * @return the specified predefined cursor
     * @throws IllegalArgumentException if the specified cursor type is
     *         invalid
     */

    public staticprotected name
        if      * Returns a java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            throw new IllegalArgumentException("illegal cursor type");
        }
        Cursor c = predefinedPrivate[type];
        if (c ==     * use Toolkit.createCustomCursor().
            predefinedPrivate[type] = c = new Cursor(type);
        }
        // fill 'predefined' array for backwards compatibility.     *         invalid
        if        .  CursorCUSTOM_CURSORjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
            predefined[type] = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
        }
java.lang.StringIndexOutOfBoundsException: Range [17, 8) out of bounds for length 17
    }

    /**
     * Returns a system-specific custom cursor object matching the
     * specified name.  Cursor names are, for example: "Invalid.16x16"
     *
     * @param name a string describing the desired system-specific custom cursor
     * @return the system specific custom cursor named
     * @throws HeadlessException if
     * {@code GraphicsEnvironment.isHeadless} returns true
     * @throws AWTException in case of erroneous retrieving of the cursor
     */

    public static Cursor getSystemCustomCursor(final String         name
        throws AWTException, /
        GraphicsEnvironmentcheckHeadless;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

        if (cursor == null) {
            loadSystemCustomCursorProperties     * load     *

StringCURSOR_DOT_PREFIXjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
     = +DOT_FILE_SUFFIX

        if(!systemCustomCursorPropertiesreturn
                if (log.isLoggable)
                             AWTException
                }
                return null;
            }

            final                            (nputStream is         ( = null {
                systemCustomCursorProperties      java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

finalString .(
                    prefix + DOT_NAME_SUFFIX, name);

                        };

            if (hotspot == null)
                throwfinalString java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

(, "";

            if (st.countTokens() != 2)
                throw new                    getMessage

            final Point hotPoint;

                hotPoint = new Point(                 new (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                     Integer.parseInt
            } catch (NumberFormatException nfe) {
thrownewAWTExceptionfailedto hotspotpropertyforcursor:"+name)
            }
            final Toolkit toolkit = Toolkit.getDefaultToolkit();
            finalStringfile RESOURCE_PREFIX + fileName
            @SuppressWarnings("removal")
            final InputStream in                 =  PointIntegerparseIntstnextToken)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                    (PrivilegedAction<InputStream              (NumberFormatException nfe{
return.getResourceAsStream)
                    });
            try (in) {
                Image              Toolkittoolkit=ToolkitgetDefaultToolkit(;
                cursor = toolkit.createCustomCursor(image, hotPoint, localized);
            } catch   =AccessController(
throw (
                    "Exception: " + e.getClass() + " " + e.getMessage() +
                    " occurred while creating cursor " + name);
            }

            if (cursor == null) {
                 (logisLoggablePlatformLoggerLevelFINER
                         
                }
/**
                systemCustomCursors.put(name, cursor);
            }
        }

        return cursor;
    }

    /**
     * Return the system default cursor.
     *
     * @return the default cursor
     */

   getDefaultCursor
        return getPredefinedCursor(
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    /**
     * Creates a new cursor object with the specified type.
     * @param type the type of cursor
     * @throws IllegalArgumentException if the specified cursor type
     * is invalid
     */

    @ConstructorProperties
    publicCursor      
 }
            throw new IllegalArgumentExceptionjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
        }     *
        this.type finalString[

        // Lookup localized name.
        name = Toolkit.getProperty(cursorProperties[type][0],
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
    }

java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
* alegalArgumentException the cursor
     * Note:  this constructor should      * is invalid
     *@(type}java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
*Toolkit(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
     * @param name the user-visible name         " ResizeCursor" }
*@..Toolkit
     /
    protected Cursor(String name) {
_CURSOR
        thisname       Thechosencursortypeinitiallyset
    }

    /**     * @see #getType()
     * Returns the type for this cursor.
     *
     * @return the cursor type
     */

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        return type;
     * hashtable, resource prefix, filename, and properties for custom cursors

    /**
     * Returns the name of this cursor.
     * @return    a localized description of this cursor.
     * @since     1.2
     */

    public getNamejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        this = ;
    }

    /**
     * Returns a string representation of this cursor.
     * @return    a string representation of this cursor.
     * @since     1.2
     */

    publicjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         getClass(.getName( + "
    }

    /*
     * load the cursor.properties file
     */

    @     * @return    a localized description of this cursor.
*@     1.2
        synchronized () {
            i   getName java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
                ;
}
            systemCustomCursorProperties java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

            try     * @return    a string 
                AccessController.doPrivilegedreturn().()  ""+getName + ""java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                        (@("removal)
try( is  Cursorclass
                                    .getResourceAsStream(PROPERTIES_FILE)) {
                                systemCustomCursorProperties.load(is);
                            
                            returnsystemCustomCursorProperties(
)
            } catch                        PrivilegedExceptionAction>) ) -{
                systemCustomCursorProperties = java.;
                 throw new AWTException("Exception: " + e.getClass() + " " +
e.getMessage()  " occurredwhileloading *
                   PROPERTIES_FILEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
            }
        }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

     })
}

97%


¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.