Class OperationLocationOptions
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.Options
-
- com.biomatters.geneious.publicapi.plugin.OperationLocationOptions
-
- All Implemented Interfaces:
XMLSerializable
public class OperationLocationOptions extends Options
AnOptions
that provides the ability to pick between running an Operation on the local computer or on a supportedGeneiousService
. Supported services include for example a Geneious Server or a Green Button server. Implementing a Geneious Server or Green Button service is outside the scope of the Geneious public API, but operations can be developed to run on Geneious Server or Green Button using the Geneious Public API. A listener can be added to viaaddLocationChangedListener(com.biomatters.geneious.publicapi.plugin.OperationLocationOptions.LocationChangedListener)
to be notified when the location changes. OperationLocationOptions can be created usingDocumentOperation.getLocationOptions(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument...)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OperationLocationOptions.LocationChangedListener
Used to indicate that the value returned fromgetSelectedLocation()
has changed.-
Nested classes/interfaces inherited from class com.biomatters.geneious.publicapi.plugin.Options
Options.Alignment, Options.BooleanOption, Options.ButtonOption, Options.ComboBoxOption<ValueType extends Options.OptionValue>, Options.ComponentCreator, Options.DateOption, Options.DoubleOption, Options.EditableComboBoxOption, Options.ExecutableFileSelectionOption, Options.FileSelectionOption, Options.IntegerOption, Options.LabelOption, Options.MultipleLineStringOption, Options.MultipleOptions, Options.Option<ValueType,ComponentType extends javax.swing.JComponent>, Options.OptionValue, Options.PageChooserType, Options.RadioOption<ValueType extends Options.OptionValue>, Options.StringOption
-
Nested classes/interfaces inherited from interface com.biomatters.geneious.publicapi.documents.XMLSerializable
XMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportType
-
-
Field Summary
-
Fields inherited from class com.biomatters.geneious.publicapi.plugin.Options
ASSOCIATED_OPTION_PROPERTY
-
Fields inherited from interface com.biomatters.geneious.publicapi.documents.XMLSerializable
ROOT_ELEMENT_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLocationChangedListener(OperationLocationOptions.LocationChangedListener listener)
Registers a listener that will be notified when the location changes.GeneiousService
getSelectedLocation()
org.jdom.Element
toXML()
Convert object to a JDOM element.-
Methods inherited from class com.biomatters.geneious.publicapi.plugin.Options
addBooleanOption, addButtonOption, addButtonOption, addChangeListener, addChildOptions, addChildOptions, addChildOptions, addChildOptions, addChildOptionsPageChooser, addCollapsibleChildOptions, addColorChooserOption, addComboBoxOption, addComboBoxOption, addCustomComponent, addCustomComponent, addCustomOption, addDateOption, addDefaultsRestoredListener, addDivider, addDocumentSelectionOption, addDocumentSelectionOption, addDoubleOption, addDoubleOption, addEditableComboBoxOption, addEditableComboBoxOption, addExecutableFileSelectionOption, addExecutableFileSelectionOption, addFileSelectionOption, addFileSelectionOption, addFileSelectionOption, addHelpButton, addHelpButtonOption, addIntegerOption, addIntegerOption, addLabel, addLabel, addLabelWithIcon, addMultipleLineStringOption, addMultipleOptions, addPrimerSelectionOption, addRadioOption, addRadioOption, addServiceOption, addServiceOption, addStringOption, addStringOption, areValuesGoodEnoughToContinue, beginAlignHorizontally, beginAlignHorizontally, canRestoreDefaults, createAdvancedPanel, createPanel, endAlignHorizontally, fireListenersToFireAfterChangingAllValues, fromXML, getAdvancedPanel, getChildOptions, getChildOptionsPageChooser, getDescriptionAndState, getDialogOptions, getExtraLeftButtonPanelComponent, getIcons, getMultipleOptions, getMultipleOptions, getMultipleOptionsMap, getNamesAndValues, getOption, getOptions, getOptionsHelp, getPanel, getParentOptions, getValue, getValueAsString, getVersionSupportForValuesToXML, hasAdvancedOptions, hasBasicOptions, initializeListenersToFireAfterChangingAllValues, isEnabled, isHideRestoreDefaultsButton, isHorizontallyCompact, isProOnly, isVisible, removeChangeListener, removeDefaultsRestoredListener, restoreDefaults, restorePreferences, restorePreferences, savePreferences, savePreferences, setChildOptionsCollapsed, setEnabled, setHideRestoreDefaultsButton, setHorizontallyCompact, setHorizontallyCompactAdvanced, setIcons, setInScrollPane, setLeftAlignLabels, setPlaceOptionsOnLeft, setProOnly, setSavePreferencesForInvisibleChildOptions, setStringValue, setStringValueOrCrash, setStringValueOrFail, setValue, setValueOrCrash, setValueOrFail, setVerticallyCompact, setVerticallyCompactAdvanced, setVisible, toString, valuesFromXML, valuesFromXML, valuesFromXMLReturningErrors, valuesToXML, valuesToXML, valuesToXML, verifyOptionsAreValid
-
-
-
-
Method Detail
-
toXML
public org.jdom.Element toXML()
Description copied from interface:XMLSerializable
Convert object to a JDOM element. The representation should be complete so thatXMLSerializable.fromXML(org.jdom.Element)
can completely restore the object's representation. It is recommended that the returned element useXMLSerializable.ROOT_ELEMENT_NAME
as its name, in which case it must not define an attribute called "type". In this case, fromXML, will be called with an element whose name may differ from the element return from this function. This recommendation allows a more compact representation of the XML can be stored. This method generally should not be called directly. Instead, you should usually callXMLSerializer.classToXML(String, XMLSerializable)
which calls this method internally. PluginDocument implementations of this method may choose to throw anXMLSerializationException
, enclosed in aRuntimeException
.- Specified by:
toXML
in interfaceXMLSerializable
- Overrides:
toXML
in classOptions
- Returns:
- object encoded as a JDOM element
-
addLocationChangedListener
public void addLocationChangedListener(OperationLocationOptions.LocationChangedListener listener)
Registers a listener that will be notified when the location changes. In addition this method immediately notifies the listener of the current location.- Parameters:
listener
- that will be notified when the location changes
-
getSelectedLocation
public GeneiousService getSelectedLocation()
- Returns:
- The GeneiousService that represents the currently selected location (for example the GeneiousServer service) or null if local is selected.
-
-