Package java.awt

Examples of java.awt.HeadlessException


                           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

        return expandsSelectedPaths;
    }

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

        }
    }

    public Applet() throws HeadlessException {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }
    }
View Full Code Here

     *
     * Throws HeadlessException if Graphics Environment is headless.
    */
    public boolean printDialog() throws HeadlessException {
        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }

        if (os.startsWith("Windows")) {         /* Windows OS */
           
            /* call Windows native dialog */
 
View Full Code Here

            throws HeadlessException {

        if (dialogAttrs == null) {
            throw new NullPointerException();
        } else if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        }

        /* Combine this PrinterJob attrs attribute set and printerAttrs set
           and resolve MediaPrintableArea/MediaMargins conflict if it is
           needed */
 
View Full Code Here

    */
    public PageFormat pageDialog(PrintRequestAttributeSet arg_attrs)
            throws HeadlessException {

        if (GraphicsEnvironment.isHeadless()) {
            throw new HeadlessException();
        } else if (arg_attrs == null) {
            throw new NullPointerException();
        } else if (getPrintService() == null) {
            JOptionPane.showMessageDialog(KeyboardFocusManager
                    .getCurrentKeyboardFocusManager().getActiveWindow(),
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

        }
    }

    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

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.