textbender.g.lang
Class ThrowableHolderV

java.lang.Object
  extended by ThrowableHolderV

@ThreadRestricted(value="AWT event dispatch")
public final class ThrowableHolderV
extends Object

View of a throwable holder in an option pane. The main dialog displays a brief summary of the throwable. A supplementary stack trace dialog may be requested by the user.


Constructor Summary
ThrowableHolderV(JOptionPane optionPane, Spool spool)
          Partially creates a ThrowableHolderV, for init2() to finish.
 
Method Summary
 JDialog dialog()
          Returns the main dialog of this view, as created from the option pane.
 JDialog dialogST()
          Returns the dialog containing the supplementary stack trace view.
 ThrowableHolderModel getModel()
          Returns the model that is viewed.
 String getTitle()
          Returns the title of the view, if any.
 ThrowableHolderV init2(ThrowableHolderModel m, Component dialogParent, Preferences preferences)
          Finishes and returns the new ThrowableHolderV.
 void setModel(ThrowableHolderModel newModel)
          Sets the model that is viewed, per getModel().
 void setTitle(String newTitle)
          Sets the title, per getTitle().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowableHolderV

public ThrowableHolderV(JOptionPane optionPane,
                        Spool spool)
Partially creates a ThrowableHolderV, for init2() to finish. Prior to calling init2(), you can create other views in the same option pane.

Parameters:
spool - for internal holds. When unwound, this instance will become disabled, and will release its internal holds.
Method Detail

init2

public ThrowableHolderV init2(ThrowableHolderModel m,
                              Component dialogParent,
                              Preferences preferences)
Finishes and returns the new ThrowableHolderV. Call once only.

Parameters:
m - model per getModel(); or null to set it later
dialogParent - Parent component per JOptionPane.getDialog(). This parameter may be null.
preferences - node for storage

dialog

public JDialog dialog()
Returns the main dialog of this view, as created from the option pane. It is not visible until you make it visible. Typically you will make it visible when the user requests it; or automatically, whenever the throwable changes.

By default, the dialog is modal, and always on top.


dialogST

public JDialog dialogST()
Returns the dialog containing the supplementary stack trace view. This dialog is normally made visible from the main dialog, when requested by the user.


getModel

public ThrowableHolderModel getModel()
Returns the model that is viewed.

Returns:
model; or null if there is none

setModel

public void setModel(ThrowableHolderModel newModel)
Sets the model that is viewed, per getModel().


getTitle

public final String getTitle()
Returns the title of the view, if any. This appears on the main dialog window. If no title is specified, then the name of the current throwable is used.

Returns:
title of the view, or null if the title is taken from the throwable

setTitle

public final void setTitle(String newTitle)
Sets the title, per getTitle().