$darkmode
DENOPTIM
denoptim.gui.GUITextReader Class Reference

A panel that allows to print the content of a text file into a GUI tab. More...

Inheritance diagram for denoptim.gui.GUITextReader:
[legend]
Collaboration diagram for denoptim.gui.GUITextReader:
[legend]

Public Member Functions

 GUITextReader (GUIMainPanel mainPanel)
 Constructor. More...
 
void displayContent (File file)
 Print the content of the given file in this tab's pane. More...
 
- Public Member Functions inherited from denoptim.gui.GUICardPanel
 GUICardPanel (GUIMainPanel mainPanel, String newPanelName)
 Constructor for JPanel meant to be a single "card" in the deck of cards. More...
 
boolean hasUnsavedChanges ()
 Check for unsaved changes in the components included in this card. More...
 

Static Public Attributes

static AtomicInteger texReaderTabUID = new AtomicInteger(1)
 Unique identified for instances of this handler. More...
 

Private Member Functions

void initialize ()
 Initialize the panel and add buttons. More...
 
void setSourceTitle (String string)
 

Private Attributes

JTextPane txtPane
 
TitledBorder border
 

Static Private Attributes

static final long serialVersionUID = 1L
 Version UID. More...
 

Additional Inherited Members

- Protected Attributes inherited from denoptim.gui.GUICardPanel
GUIMainPanel mainPanel
 The main panel (cards deck) More...
 

Detailed Description

A panel that allows to print the content of a text file into a GUI tab.

Author
Marco Foscato

Definition at line 44 of file GUITextReader.java.

Constructor & Destructor Documentation

◆ GUITextReader()

denoptim.gui.GUITextReader.GUITextReader ( GUIMainPanel  mainPanel)

Constructor.

Definition at line 65 of file GUITextReader.java.

References denoptim.gui.GUITextReader.initialize(), denoptim.gui.GUICardPanel.mainPanel, and denoptim.gui.GUITextReader.texReaderTabUID.

Here is the call graph for this function:

Member Function Documentation

◆ displayContent()

void denoptim.gui.GUITextReader.displayContent ( File  file)

Print the content of the given file in this tab's pane.

Parameters
filethe file to be read

Definition at line 109 of file GUITextReader.java.

References denoptim.io.DenoptimIO.readText(), denoptim.gui.GUITextReader.setSourceTitle(), and denoptim.gui.GUITextReader.txtPane.

Referenced by denoptim.gui.MainToolBar.openFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

void denoptim.gui.GUITextReader.initialize ( )
private

Initialize the panel and add buttons.

Definition at line 78 of file GUITextReader.java.

References denoptim.gui.ButtonsBar.add(), denoptim.gui.GUITextReader.border, and denoptim.gui.GUITextReader.txtPane.

Referenced by denoptim.gui.GUITextReader.GUITextReader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSourceTitle()

void denoptim.gui.GUITextReader.setSourceTitle ( String  string)
private

Definition at line 136 of file GUITextReader.java.

References denoptim.gui.GUITextReader.border.

Referenced by denoptim.gui.GUITextReader.displayContent().

Here is the caller graph for this function:

Member Data Documentation

◆ border

TitledBorder denoptim.gui.GUITextReader.border
private

◆ serialVersionUID

final long denoptim.gui.GUITextReader.serialVersionUID = 1L
staticprivate

Version UID.

Definition at line 49 of file GUITextReader.java.

◆ texReaderTabUID

AtomicInteger denoptim.gui.GUITextReader.texReaderTabUID = new AtomicInteger(1)
static

Unique identified for instances of this handler.

Definition at line 54 of file GUITextReader.java.

Referenced by denoptim.gui.GUITextReader.GUITextReader().

◆ txtPane

JTextPane denoptim.gui.GUITextReader.txtPane
private

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