Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
org.sleuthkit.autopsy.corecomponents.TextPrompt Class Reference

Inherits JLabel, FocusListener, and DocumentListener.


enum  Show

Public Member Functions

 TextPrompt (String text, JTextComponent component)
 TextPrompt (String text, JTextComponent component, Show show)
void changeAlpha (float alpha)
void changeAlpha (int alpha)
void changedUpdate (DocumentEvent e)
void changeStyle (int style)
void focusGained (FocusEvent e)
void focusLost (FocusEvent e)
Show getShow ()
boolean getShowPromptOnce ()
void insertUpdate (DocumentEvent e)
void removeUpdate (DocumentEvent e)
void setShow (Show show)
void setShowPromptOnce (boolean showPromptOnce)

Private Member Functions

void checkForPrompt ()

Private Attributes

JTextComponent component
Document document
int focusLost
Show show
boolean showPromptOnce

Detailed Description

The TextPrompt class will display a prompt over top of a text component when the Document of the text field is empty. The Show property is used to determine the visibility of the prompt.

The Font and foreground Color of the prompt will default to those properties of the parent text component. You are free to change the properties after class construction. From:

Definition at line 20 of file

Constructor & Destructor Documentation

org.sleuthkit.autopsy.corecomponents.TextPrompt.TextPrompt ( String  text,
JTextComponent  component 
org.sleuthkit.autopsy.corecomponents.TextPrompt.TextPrompt ( String  text,
JTextComponent  component,
Show  show 

Member Function Documentation

void org.sleuthkit.autopsy.corecomponents.TextPrompt.changeAlpha ( float  alpha)

Convenience method to change the alpha value of the current foreground Color to the specifice value.

alphavalue in the range of 0 - 1.0.

Definition at line 66 of file

void org.sleuthkit.autopsy.corecomponents.TextPrompt.changeAlpha ( int  alpha)

Convenience method to change the alpha value of the current foreground Color to the specifice value.

alphavalue in the range of 0 - 255.

Definition at line 76 of file

void org.sleuthkit.autopsy.corecomponents.TextPrompt.changedUpdate ( DocumentEvent  e)

Definition at line 204 of file

void org.sleuthkit.autopsy.corecomponents.TextPrompt.changeStyle ( int  style)

Convenience method to change the style of the current Font. The style values are found in the Font class. Common values might be: Font.BOLD, Font.ITALIC and Font.BOLD + Font.ITALIC.

stylevalue representing the the new style of the Font.

Definition at line 95 of file

void org.sleuthkit.autopsy.corecomponents.TextPrompt.checkForPrompt ( )
void org.sleuthkit.autopsy.corecomponents.TextPrompt.focusGained ( FocusEvent  e)
void org.sleuthkit.autopsy.corecomponents.TextPrompt.focusLost ( FocusEvent  e)
Show org.sleuthkit.autopsy.corecomponents.TextPrompt.getShow ( )

Get the Show property

the Show property.

Definition at line 104 of file


boolean org.sleuthkit.autopsy.corecomponents.TextPrompt.getShowPromptOnce ( )

Get the showPromptOnce property

the showPromptOnce property.

Definition at line 128 of file

References org.sleuthkit.autopsy.corecomponents.TextPrompt.showPromptOnce.

void org.sleuthkit.autopsy.corecomponents.TextPrompt.insertUpdate ( DocumentEvent  e)
void org.sleuthkit.autopsy.corecomponents.TextPrompt.removeUpdate ( DocumentEvent  e)
void org.sleuthkit.autopsy.corecomponents.TextPrompt.setShow ( Show  show)

Set the prompt Show property to control when the promt is shown. Valid values are:

Show.AWLAYS (default) - always show the prompt Show.Focus_GAINED - show the prompt when the component gains focus (and hide the prompt when focus is lost) Show.Focus_LOST - show the prompt when the component loses focus (and hide the prompt when focus is gained)

showa valid Show enum

Definition at line 119 of file


Referenced by org.sleuthkit.autopsy.corecomponents.TextPrompt.TextPrompt().

void org.sleuthkit.autopsy.corecomponents.TextPrompt.setShowPromptOnce ( boolean  showPromptOnce)

Show the prompt once. Once the component has gained/lost focus once, the prompt will not be shown again.

showPromptOncewhen true the prompt will only be shown once, otherwise it will be shown repeatedly.

Definition at line 139 of file

References org.sleuthkit.autopsy.corecomponents.TextPrompt.showPromptOnce.

Member Data Documentation

JTextComponent org.sleuthkit.autopsy.corecomponents.TextPrompt.component
Document org.sleuthkit.autopsy.corecomponents.TextPrompt.document

Definition at line 31 of file

int org.sleuthkit.autopsy.corecomponents.TextPrompt.focusLost

Definition at line 35 of file

boolean org.sleuthkit.autopsy.corecomponents.TextPrompt.showPromptOnce

The documentation for this class was generated from the following file:

Copyright © 2012-2016 Basis Technology. Generated on: Mon Apr 24 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.