public interface Line extends AutoCloseable
Modifier and Type | Interface and Description |
---|---|
static class |
Line.Info
An object of this type holds information about a Line.
|
Modifier and Type | Method and Description |
---|---|
void |
addLineListener(LineListener listener)
Add a listener which will be notified whenever this Line changes state.
|
void |
close()
Close this line.
|
Control |
getControl(Control.Type what)
Return the control associated with this Line that matches the
argument.
|
Control[] |
getControls()
Return an array of controls associated with this Line.
|
Line.Info |
getLineInfo()
Return the Info object associated with this Line.
|
boolean |
isControlSupported(Control.Type what)
Return true if a Control matching the argument is available for this
Line, false otherwise.
|
boolean |
isOpen()
Return true if this line is open, false otherwise.
|
void |
open()
Open this line.
|
void |
removeLineListener(LineListener listener)
Remove the listener from this Line; after this call the listener will
no longer be notified when this Line changes state.
|
void addLineListener(LineListener listener)
listener
- the listener to notifyvoid close()
close
in interface AutoCloseable
Control getControl(Control.Type what)
what
- the type of the control to matchIllegalArgumentException
- if a control of this type is not
available for this lineControl[] getControls()
Line.Info getLineInfo()
boolean isControlSupported(Control.Type what)
what
- the type of the control to matchboolean isOpen()
void open() throws LineUnavailableException
LineUnavailableException
- if the line is unavailable for some
reasonvoid removeLineListener(LineListener listener)
listener
- the listener to remove