Class DialogOwner

java.lang.Object
javax.print.attribute.standard.DialogOwner
All Implemented Interfaces:
Serializable, Attribute, PrintRequestAttribute

public final class DialogOwner extends Object implements PrintRequestAttribute
An attribute class used to support requesting a print or page setup dialog be kept displayed on top of all windows or some specific window.

Constructed without any arguments it will request that a print or page setup dialog be configured as if the application directly was to specify java.awt.Window.setAlwaysOnTop(true), subject to permission checks.

Constructed with a Window parameter, it requests that the dialog be owned by the specified window.

Since:
11
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an instance which can be used to request java.awt.Window.setAlwaysOnTop(true) behaviour.
    Constructs an instance which can be used to request that the specified Window be the owner of the dialog.
  • Method Summary

    Modifier and Type
    Method
    Description
    final Class<? extends Attribute>
    Get the printing attribute class which is to be used as the "category" for this printing attribute value.
    final String
    Get the name of the category of which this attribute value is an instance.
    Returns a Window owner, if one was specified, otherwise null.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    Answers a string containing a concise, human-readable description of the receiver.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
  • Constructor Details

    • DialogOwner

      public DialogOwner()
      Constructs an instance which can be used to request java.awt.Window.setAlwaysOnTop(true) behaviour. This should be used where there is no application preferred owner window. Whether this has any effect depends on if always on top is supported for this platform and the particular dialog to be displayed.
    • DialogOwner

      public DialogOwner(Window owner)
      Constructs an instance which can be used to request that the specified Window be the owner of the dialog.
      Parameters:
      owner - window.
  • Method Details

    • getOwner

      public Window getOwner()
      Returns a Window owner, if one was specified, otherwise null.
      Returns:
      an owner window.
    • getCategory

      public final Class<? extends Attribute> getCategory()
      Get the printing attribute class which is to be used as the "category" for this printing attribute value.

      For class DialogOwner, the category is class DialogOwner itself.

      Specified by:
      getCategory in interface Attribute
      Returns:
      printing attribute class (category), an instance of class java.lang.Class
    • getName

      public final String getName()
      Get the name of the category of which this attribute value is an instance.

      For class DialogOwner, the category name is "dialog-owner".

      Specified by:
      getName in interface Attribute
      Returns:
      attribute category name