## org.autoplot.datasource.DataSetSelector

Swing component for selecting dataset URIs. This provides hooks for completions.

## DataSetSelector( )

Creates new form DataSetSelector

## PROP_RECENT

## BUSY_ICON

## FILEMAG_ICON

## FILEMAG_BUSY_ICON

## PROPERTY_MESSAGE

## FILE_NOT_FOUND

## PROP_HIDEPLAYBUTTON

## PROP_PLOTITBUTTONVISIBLE

## PROP_ENABLEDATASOURCE

## PROP_TIMERANGE

## PROP_SUGGESTFSAGG

## PROP_SUGGESTFILES

## PROP_CARDSELECTED

## addAbouts

addAbouts( ) → void

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addActionListener

addActionListener( java.awt.event.ActionListener listener ) → void

Registers ActionListener to receive events.

### Parameters

listener - The listener to register.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addCancelEscapeKey

addCancelEscapeKey( javax.swing.JDialog dialog ) → void

add a listener for escape key press, which will setVisible(false) and clear the dialog.

### Parameters

dialog - a JDialog

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addCompletionKeys

addCompletionKeys( ) → void

THIS MUST BE CALLED AFTER THE COMPONENT IS ADDED. This is so ENTER works properly.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addSuggestFile

addSuggestFile( String template ) → void

show completions for this regex.

### Parameters

template - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addToRecent

addToRecent( String suri ) → void

This makes sense to me, where you can just add a URL to the selector. I haven't looked at this class in ten years, and it's bizarre how complex it is. I'm making this a method so that this is done in one place. This contains the logic which was in the pngwalkTool. If there are other things to be done, it will be done here.

### Parameters

suri - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## browseSourceType

browseSourceType( ) → void

show the initial parameters completions for the type, or the editor, if that's available. This can be called from the event thread.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## browseSourceType

browseSourceType( java.util.List problems ) → void

show the initial parameters completions for the type, or the editor, if that's available. This can be called from the event thread.

### Parameters

problems - we're entering this GUI because of problems with the URI, so mark these problems. See DataSourceFactory.reject.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getAcceptPattern

getAcceptPattern( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getBrowseButton

getBrowseButton( ) → javax.swing.JButton

automated GUI testing needs access to subcomponents. This provides access to the inspect/browse button that when pressed enters a GUI editor to graphically work on the URI.

### Returns:

the inspect/browse button
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getBrowseTypeExt

getBrowseTypeExt( ) → String

Getter for property browseTypeExt.

### Returns:

Value of property browseTypeExt.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDefaultRecent

getDefaultRecent( ) → java.util.List

### Returns:

java.util.List
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getEditor

getEditor( ) → javax.swing.JTextField

provide direct access to the editor component. This should not be used, because it makes it more difficult to control and define the state. Use this to add listeners for example, but do not modify the value.

### Returns:

the text editor
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getGoButton

getGoButton( ) → javax.swing.JButton

automated GUI testing needs access to subcomponents. This provides access to the green play button that when pressed fires off a "go" event

### Returns:

the green go button
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getMessage

getMessage( ) → String

Getter for property message.

### Returns:

Value of property message.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getOpenLocalAction

getOpenLocalAction( ) → javax.swing.Action

### Returns:

javax.swing.Action
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getOpenLocalVapAction

getOpenLocalVapAction( ) → javax.swing.Action

### Returns:

javax.swing.Action
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getPromptText

getPromptText( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getRecent

getRecent( ) → java.util.List

Getter for property recent.

### Returns:

Value of property recent.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getRecentMenu

getRecentMenu( ) → javax.swing.JMenu

### Returns:

javax.swing.JMenu
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getTimeRange

getTimeRange( ) → DatumRange

get the timerange associated with this focus dataset. This is typically the same as the xaxis range.

### Returns:

the timerange associated with this focus dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getValue

getValue( ) → String

Getter for property value. TODO: this should really be redone, returning the value property.

### Returns:

Value of property value.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## hasActionTrigger

hasActionTrigger( String suri ) → boolean

return true if the action trigger would be handled.

### Parameters

suri - the URI.

### Returns:

true if the action trigger would be handled.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## hideCompletions

hideCompletions( ) → void

force hide the completions list.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isCardSelected

isCardSelected( ) → boolean

added to listen to changes, but this must also be set externally to switch back.

### Returns:

a boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isEnableDataSource

isEnableDataSource( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isExpertMode

isExpertMode( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isHidePlayButton

isHidePlayButton( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isPendingChanges

isPendingChanges( ) → boolean

provide access to timer for GUI testing.

### Returns:

a boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isPlotItButtonVisible

isPlotItButtonVisible( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isSuggestFiles

isSuggestFiles( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isSuggestFsAgg

isSuggestFsAgg( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## main

main( String[] args ) → void

### Parameters

args - a java.lang.String[]

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## maybeAddFileNotFound

maybeAddFileNotFound( String msg ) → String

there are two places in the code where FileNotFound messages are passed in with just the file name.

### Parameters

msg - the message, which might just be the filename.

### Returns:

the message clarified.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## maybePlot

maybePlot( boolean allowModifiers ) → void

if the dataset requires parameters that aren't provided, then show completion list. Otherwise, fire off event.

### Parameters

allowModifiers - turn off any modifiers like shift or control.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## maybePlot

maybePlot( int keyModifiers ) → void

trigger a plot, allowing modifiers such as: 0 replace plot KeyEvent.CTRL_MASK plot below KeyEvent.SHIFT_MASK overplot KeyEvent.ALT_MASK edit this URI. (Only with recent history uses this for now, also bookmarks)

### Parameters

keyModifiers - an int

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pickTimeRange

pickTimeRange( java.awt.Component parent, DatumRange timeRange1, DatumRange timeRange2 ) → DatumRange

allow the user to pick one of two times, when it is ambiguous what they want.

### Parameters

parent - null or the component to focus.
timeRange1 - a DatumRange
timeRange2 - a DatumRange

### Returns:

the timerange selected.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pickTimeRange

pickTimeRange( java.awt.Component parent, java.util.List timeRange, java.util.List labels ) → DatumRange

Allow the user to pick one of a set of times, when it is ambiguous what they want.

### Parameters

parent - null or the component to focus.
timeRange - list of time ranges, which may also contain null.
labels - for each time range.

### Returns:

the time range selected.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## registerActionTrigger

registerActionTrigger( String regex, javax.swing.Action action ) → void

This is how we allow .vap files to be in the dataSetSelector. We register a pattern for which an action is invoked.

### Parameters

regex - regular expression for the trigger.
action - the action to take.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## registerBrowseTrigger

registerBrowseTrigger( String regex, javax.swing.Action action ) → void

### Parameters

regex - a String
action - an Action

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removeActionListener

removeActionListener( java.awt.event.ActionListener listener ) → void

Removes ActionListener from the list of listeners.

### Parameters

listener - The listener to remove.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## replacePlayButton

replacePlayButton( javax.swing.Icon icon, javax.swing.AbstractAction action ) → void

rather than allowing clients to add buttons, which would make Matisse GUI builder less useful here, clients can replace the behavior of the play button.

### Parameters

icon - an Icon
action - an AbstractAction

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setAcceptPattern

setAcceptPattern( String acceptPattern ) → void

pattern for filenames allowed. null means anything allowed.

### Parameters

acceptPattern - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setAlternatePeer

setAlternatePeer( String title, String card ) → void

### Parameters

title - a String
card - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setBrowseTypeExt

setBrowseTypeExt( String browseTypeExt ) → void

Setter for property browseTypeExt.

### Parameters

browseTypeExt - New value of property browseTypeExt.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setCardSelected

setCardSelected( boolean cardSelected ) → void

### Parameters

cardSelected - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setCardSelectedNoEventKludge

setCardSelectedNoEventKludge( boolean cardSelected ) → void

### Parameters

cardSelected - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDefaultRecent

setDefaultRecent( java.util.List recent ) → void

allow clients (e.g. Autoplot) to set a list of recent that new instances will use.

### Parameters

recent - the list

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDisableDataSources

setDisableDataSources( boolean b ) → void

allows the dataSetSelectorComboBox to be used to select files.

### Parameters

b - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setEnableDataSource

setEnableDataSource( boolean enableDataSource ) → void

delegate down to datasource when doing completions.

### Parameters

enableDataSource - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setEnabled

setEnabled( boolean enabled ) → void

### Parameters

enabled - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setExpertMode

setExpertMode( boolean expert ) → void

### Parameters

expert - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setHidePlayButton

setHidePlayButton( boolean hidePlayButton ) → void

### Parameters

hidePlayButton - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setMessage

setMessage( String message ) → void

Setter for property message.

### Parameters

message - New value of property message.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setMonitorFactory

setMonitorFactory( org.das2.system.MonitorFactory factory ) → void

### Parameters

factory - a MonitorFactory

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setPlayButton

setPlayButton( boolean t ) → void

if this is false, then the editor dialogs will show only "okay" and "plot below" is hidden.

### Parameters

t - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setPlotItButtonVisible

setPlotItButtonVisible( boolean plotItButtonVisible ) → void

### Parameters

plotItButtonVisible - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setPromptText

setPromptText( String text ) → void

### Parameters

text - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setRecent

setRecent( java.util.List recent ) → void

Setter for property recent. Should be called from the event thread. This sets defaultRecent as well, so other clients can get a list of recent values.

### Parameters

recent - New value of property recent.

### Returns:

void (returns nothing)

### See Also:

getDefaultRecent()
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setSuggestFiles

setSuggestFiles( boolean suggestFiles ) → void

### Parameters

suggestFiles - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setSuggestFsAgg

setSuggestFsAgg( boolean suggestFsAgg ) → void

### Parameters

suggestFsAgg - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setTimeRange

setTimeRange( DatumRange timerange ) → void

set default timeRange when aggregation is used, or for dialogs. null is allowed, indicating there is no focus timerange

### Parameters

timerange - a DatumRange

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setValue

setValue( String value ) → void

Set the current value for the editor. This does not fire an event, so call maybePlot() to accept the value.

### Parameters

value - the new URI.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## showCompletions

showCompletions( ) → void

show completions, as if the scientist had hit tab

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## showFileSystemCompletions

showFileSystemCompletions( boolean suggestFsAgg, boolean suggestFiles, String acceptRegex ) → void

Wrap DataSetURI.getFileSystemCompletions for action triggers.

### Parameters

suggestFsAgg - include aggregations it sees. These are a guess.
suggestFiles - include files as well as aggregations.
acceptRegex - if non-null, filenames must match this regex. See Pattern.compile

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## showUserExceptionDialog

showUserExceptionDialog( java.awt.Component parent, String msg, String title, java.lang.Exception ex, int messageType ) → void

show the message, assuming that it is something that it's something for the user to fix, but provide details button.

### Parameters

parent - a Component
msg - a String
title - a String
ex - an Exception
messageType - an int

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]