GrammarScope  4.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
grammarscope.common.dialog.ResourceDialog Class Reference
Inheritance diagram for grammarscope.common.dialog.ResourceDialog:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.common.dialog.ResourceDialog:
Collaboration graph
[legend]

Public Member Functions

 ResourceDialog (final String dirBase, final String filter, final String exts, final String jarEntryFilter)
 
String getUrl ()
 
void insertUpdate (final DocumentEvent e)
 
void removeUpdate (final DocumentEvent e)
 
void changedUpdate (final DocumentEvent e)
 
void valueChanged (final ListSelectionEvent event)
 
void stateChanged (final ChangeEvent event)
 
void setVisible (final boolean flag)
 

Static Public Member Functions

static String encode (final String str)
 
static void main (final String[] args)
 

Public Attributes

boolean ok
 

Protected Attributes

final String dirBase
 
final String filter
 
final String jarEntryFilter
 

Private Member Functions

JTable makeEntriesTable ()
 
JButton makeBrowseButton (final JTextField field, @SuppressWarnings("SameParameterValue") final boolean directory, final String exts, @SuppressWarnings("SameParameterValue") final String type)
 
JFileChooser makeFileChooser (final String filter, final String exts, final String type)
 
Object[][] getData (final Enumeration< JarEntry > entries)
 
String makeUrl (final boolean jarEntry)
 
void update ()
 
void updateUrl ()
 

Static Private Member Functions

static JFileChooser makeFolderChooser ()
 
static void setCurrentDirectory (final JFileChooser chooser, final String currentDirectory)
 

Private Attributes

final JTextField fileTextField
 
final JCheckBox jarEntriesCheckBox
 
final JLabel jarEntriesLabel
 
final Container jarEntriesContainer
 
final JTable jarEntriesTable
 
final JTextField urlTextField
 

Static Private Attributes

static final long serialVersionUID = 1L
 
static final String[] columnNames = { "jar entry" }
 

Detailed Description

Resource URL dialog

Author
Bernard Bou

Constructor & Destructor Documentation

◆ ResourceDialog()

grammarscope.common.dialog.ResourceDialog.ResourceDialog ( final String  dirBase,
final String  filter,
final String  exts,
final String  jarEntryFilter 
)

Constructor

Parameters
dirBasedirectory base
filteracceptable filter to match name against
extsextensions
jarEntryFilterjar entry filter

Member Function Documentation

◆ changedUpdate()

void grammarscope.common.dialog.ResourceDialog.changedUpdate ( final DocumentEvent  e)

◆ encode()

static String grammarscope.common.dialog.ResourceDialog.encode ( final String  str)
static

Encode URL

Parameters
strURL string
Returns
encoded URL string

◆ getData()

Object [][] grammarscope.common.dialog.ResourceDialog.getData ( final Enumeration< JarEntry >  entries)
private

Make table model

Parameters
entriesjar entries
Returns
table model

◆ getUrl()

String grammarscope.common.dialog.ResourceDialog.getUrl ( )

Get URL

Returns
url

◆ insertUpdate()

void grammarscope.common.dialog.ResourceDialog.insertUpdate ( final DocumentEvent  e)

◆ main()

static void grammarscope.common.dialog.ResourceDialog.main ( final String[]  args)
static

Main

Parameters
argsarg[0] initial jar

◆ makeBrowseButton()

JButton grammarscope.common.dialog.ResourceDialog.makeBrowseButton ( final JTextField  field,
@SuppressWarnings("SameParameterValue") final boolean  directory,
final String  exts,
@SuppressWarnings("SameParameterValue") final String  type 
)
private

Make browse button

Parameters
fieldpeer text field
directorydirectory
extsacceptable extensions
typetype
Returns
browse button

◆ makeEntriesTable()

JTable grammarscope.common.dialog.ResourceDialog.makeEntriesTable ( )
private

Entries table

Returns
table

◆ makeFileChooser()

JFileChooser grammarscope.common.dialog.ResourceDialog.makeFileChooser ( final String  filter,
final String  exts,
final String  type 
)
private

Make file chooser

Parameters
filterfilter
extsextension
typetype
Returns
file chooser

◆ makeFolderChooser()

static JFileChooser grammarscope.common.dialog.ResourceDialog.makeFolderChooser ( )
staticprivate

Make folder chooser

Returns
folder chooser

◆ makeUrl()

String grammarscope.common.dialog.ResourceDialog.makeUrl ( final boolean  jarEntry)
private

Make url

Parameters
jarEntrywhether to specify jar entry
Returns
url

◆ removeUpdate()

void grammarscope.common.dialog.ResourceDialog.removeUpdate ( final DocumentEvent  e)

◆ setCurrentDirectory()

static void grammarscope.common.dialog.ResourceDialog.setCurrentDirectory ( final JFileChooser  chooser,
final String  currentDirectory 
)
staticprivate

Set current directory for file chooser

Parameters
chooserfile chooser
currentDirectorydirectory to set as current

◆ setVisible()

void grammarscope.common.dialog.ResourceDialog.setVisible ( final boolean  flag)

◆ stateChanged()

void grammarscope.common.dialog.ResourceDialog.stateChanged ( final ChangeEvent  event)

◆ update()

void grammarscope.common.dialog.ResourceDialog.update ( )
private

Update entries and URL

◆ updateUrl()

void grammarscope.common.dialog.ResourceDialog.updateUrl ( )
private

Update URL

◆ valueChanged()

void grammarscope.common.dialog.ResourceDialog.valueChanged ( final ListSelectionEvent  event)

Member Data Documentation

◆ columnNames

final String [] grammarscope.common.dialog.ResourceDialog.columnNames = { "jar entry" }
staticprivate

Column names

◆ dirBase

final String grammarscope.common.dialog.ResourceDialog.dirBase
protected

Directory base

◆ fileTextField

final JTextField grammarscope.common.dialog.ResourceDialog.fileTextField
private

Jar file

◆ filter

final String grammarscope.common.dialog.ResourceDialog.filter
protected

Filter on files or jar entries

◆ jarEntriesCheckBox

final JCheckBox grammarscope.common.dialog.ResourceDialog.jarEntriesCheckBox
private

Jar entries check box

◆ jarEntriesContainer

final Container grammarscope.common.dialog.ResourceDialog.jarEntriesContainer
private

Jar entries container

◆ jarEntriesLabel

final JLabel grammarscope.common.dialog.ResourceDialog.jarEntriesLabel
private

Jar entries label

◆ jarEntriesTable

final JTable grammarscope.common.dialog.ResourceDialog.jarEntriesTable
private

Jar entries

◆ jarEntryFilter

final String grammarscope.common.dialog.ResourceDialog.jarEntryFilter
protected

Filter on jar entries

◆ ok

boolean grammarscope.common.dialog.ResourceDialog.ok

Ok flag

◆ serialVersionUID

final long grammarscope.common.dialog.ResourceDialog.serialVersionUID = 1L
staticprivate

◆ urlTextField

final JTextField grammarscope.common.dialog.ResourceDialog.urlTextField
private

URL


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