Package java.awt

Examples of java.awt.HeadlessException


  public VersionEditor() throws HeadlessException {
    super();

    if(CurrentVersion.fromJar())
      throw new HeadlessException("You may not run the version editor from a JAR");

    setTitle("BNU-Bot Version Editor");

    initializeGui();
View Full Code Here


        }
        // Declaring the argument as Object rather than Component avoids class not
        // found errors on phoneME foundation profile.
        static long getComponentID(Object o) throws HeadlessException {
            if (GraphicsEnvironment.isHeadless()) {
                throw new HeadlessException("No native windows when headless");
            }
            Component c = (Component)o;
            if (c.isLightweight()) {
                throw new IllegalArgumentException("Component must be heavyweight");
            }
View Full Code Here

        }
        // Declaring the argument as Object rather than Component avoids class not
        // found errors on phoneME foundation profile.
        static long getComponentID(Object o) throws HeadlessException {
            if (GraphicsEnvironment.isHeadless()) {
                throw new HeadlessException("No native windows when headless");
            }
            Component c = (Component)o;
            if (c.isLightweight()) {
                throw new IllegalArgumentException("Component must be heavyweight");
            }
View Full Code Here

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

    DropTargetAutoScroller autoScroller;

    public DropTarget(Component c, int ops, DropTargetListener dtl,
            boolean act, FlavorMap fm) throws HeadlessException {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
        context = createDropTargetContext();
        setDefaultActionsImpl(ops);
        active = (c != null) ? act : true;
        dropTargetListener = dtl;
View Full Code Here

        }
    }

    public static DragSource getDefaultDragSource() {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }

        if (defaultSource == null) {
            defaultSource = new DragSource();
        }
View Full Code Here

        return threshold;
    }

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

        dragSourceListeners = new ListenerList<DragSourceListener>();
        dragSourceMotionListeners = new ListenerList<DragSourceMotionListener>();
    }
View Full Code Here

        }
    }

    public void setDragEnabled(final boolean b) {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
        isDragEnabled = b; //TODO it may be no enought(some L&F)
        //TODO Really it will not work, because javax.swing.Transfer doesn't
        //provide enough functionality. Appropriate TransferHandler sets by
        // BasicTextUI. But I don't know now, what should I do, if it
View Full Code Here

        return (TableCellEditor)getClosestClass(columnClass, defaultEditorsByColumnClass);
    }

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

        return cellRenderer;
    }

    public void setDragEnabled(final boolean dragEnabled) {
        if (dragEnabled && GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException("DnD could not be used in headless environment");
        }

        this.dragEnabled = dragEnabled;
    }
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.