Package java.awt

Examples of java.awt.HeadlessException


                                       PrintRequestAttributeSet attributes)
        throws HeadlessException
{

    if (GraphicsEnvironment.isHeadless()) {
        throw new HeadlessException();
    }

    int initialIndex = checkServices(services, defaultService, attributes);

    Window activeWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager()
View Full Code Here


        return expandsSelectedPaths;
    }

    public void setDragEnabled(final boolean enabled) {
        if (enabled && GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
        dragEnabled = enabled;
    }
View Full Code Here

                       PrintRequestAttributeSet dialogAttrs,
                       Window owner)
{
    if (GraphicsEnvironment.isHeadless()) {
        dialogResult = SETUP_ERROR;
        throw new HeadlessException();
    }

    if (owner instanceof Frame) {
        printDialog = new JDialog((Frame)owner, "Print", true, gc);
    } else if(owner instanceof Dialog) {
View Full Code Here

    dialogType = PAGE_DIALOG;

    if (GraphicsEnvironment.isHeadless()) {
        dialogResult = SETUP_ERROR;
        throw new HeadlessException();
    }

    if (owner instanceof Frame) {
        printDialog = new JDialog((Frame)owner, "Print", true, gc);
    } else if (owner instanceof Dialog) {
View Full Code Here

     *            returns true
     * @see java.awt.GraphicsEnvironment#isHeadless
     */
    public static DragSource getDefaultDragSource() {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        } else {
            return dflt;
        }
    }
View Full Code Here

     *            returns true
     * @see java.awt.GraphicsEnvironment#isHeadless
     */
    public DragSource() throws HeadlessException {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
    }
View Full Code Here

    public DropTarget(Component c, int ops, DropTargetListener dtl,
                      boolean act, FlavorMap fm)
        throws HeadlessException
    {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }

        component = c;

        setDefaultActions(ops);
View Full Code Here

        throws HeadlessException
    {
        int defaultIndex = -1;

        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        } else if ((services == null) || (services.length == 0)) {
            throw new IllegalArgumentException("services must be non-null " +
                                               "and non-empty");
        } else if (attributes == null) {
            throw new IllegalArgumentException("attributes must be non-null");
View Full Code Here

     *  description: determines whether automatic drag handling is enabled
     *        bound: false
     */
    public void setDragEnabled(boolean b) {
        if (b && GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
        dragEnabled = b;
    }
View Full Code Here

     *  description: determines whether automatic drag handling is enabled
     *        bound: false
     */
    public void setDragEnabled(boolean b) {
        if (b && GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
  dragEnabled = b;
    }
View Full Code Here

TOP

Related Classes of java.awt.HeadlessException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.