public abstract class ConsolePanel extends javax.swing.JPanel implements PropertiesProvider, XmlInOutMethods, pt.lsts.neptus.messages.listener.MessageListener<pt.lsts.neptus.messages.listener.MessageInfo,pt.lsts.imc.IMCMessage>, MainVehicleChangeListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JDialog |
dialog |
protected javax.swing.AbstractAction |
popUpAction |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
ConsolePanel(ConsoleLayout console)
The default constructor.
|
ConsolePanel(ConsoleLayout console,
boolean usedInsideAnotherConsolePanel)
The constructor if you intend to use it inside another
ConsolePanel
(usedInsideAnotherConsolePanel should be true). |
Modifier and Type | Method and Description |
---|---|
protected void |
activateComponents() |
javax.swing.JCheckBoxMenuItem |
addCheckMenuItem(java.lang.String itemPath,
javax.swing.ImageIcon icon,
CheckMenuChangeListener checkListener)
Creates and retrieves a console check menu item (toggle)
|
javax.swing.JMenu |
addMenu(java.lang.String itemPath,
javax.swing.ImageIcon icon) |
javax.swing.JMenuItem |
addMenuItem(java.lang.String itemPath,
javax.swing.ImageIcon icon,
java.awt.event.ActionListener actionListener)
Creates and retrieves a console menu item
|
org.dom4j.Document |
asDocument() |
org.dom4j.Document |
asDocument(java.lang.String rootElementName) |
org.dom4j.Element |
asElement() |
org.dom4j.Element |
asElement(java.lang.String rootElementName) |
java.lang.String |
asXML()
Este problema foi resolvido com a versão 1.6.1 do DOM4J.
|
java.lang.String |
asXML(java.lang.String rootElementName)
Este problema foi resolvido com a versão 1.6.1 do DOM4J.
|
void |
clean()
This is called when the console wants to remove the panel from the console (override it if
needed to properly disposal of the component).
|
abstract void |
cleanSubPanel()
Abstract implementation.
|
protected void |
deactivateComponents() |
protected ConsolePanel[] |
getChildren() |
ConsoleLayout |
getConsole() |
java.lang.String |
getDescription() |
boolean |
getEditMode() |
javax.swing.ImageIcon |
getImageIcon() |
protected MainPanel |
getMainpanel() |
java.lang.String |
getMainVehicleId() |
java.lang.String |
getName() |
com.l2fprod.common.propertysheet.DefaultProperty[] |
getProperties() |
java.lang.String |
getPropertiesDialogTitle() |
java.lang.String[] |
getPropertiesErrors(com.l2fprod.common.propertysheet.Property[] properties) |
protected pt.lsts.imc.state.ImcSystemState |
getState() |
boolean |
getVisibility() |
void |
inDocument(org.dom4j.Document d) |
void |
inElement(org.dom4j.Element e) |
void |
init()
Empty implementation.
|
abstract void |
initSubPanel() |
boolean |
isFixedPosition() |
boolean |
isFixedSize() |
boolean |
isResizable() |
void |
mainVehicleChange(java.lang.String id)
If you need to react to main vehicle change override
#mainVehicleChangeNotification(String) instead. |
void |
onMessage(pt.lsts.neptus.messages.listener.MessageInfo arg0,
pt.lsts.imc.IMCMessage arg1) |
void |
paint(java.awt.Graphics g) |
protected void |
parentResized(java.awt.Dimension oldSize,
java.awt.Dimension newSize) |
void |
parseXML(java.lang.String str) |
void |
popupHidden() |
void |
popupShown() |
void |
post(java.lang.Object event)
Alias method to send console events
|
protected void |
readChildFromXml(org.dom4j.Element e)
Used to process the child elements of the configuration of node.
|
protected void |
readPropertiesFromXml(org.dom4j.Element e)
Used to process the properties for this component from the configuration of node.
|
protected void |
recalculateRelativePosAndSize() |
void |
removeCheckMenuItem(java.lang.String itemPath) |
void |
removeMenuItem(java.lang.String itemPath) |
boolean |
send(pt.lsts.imc.IMCMessage message)
Send IMCMessage to Main System
|
boolean |
send(java.lang.String destination,
pt.lsts.imc.IMCMessage message)
Send IMCMessage
|
boolean |
sendToOtherCCUs(pt.lsts.imc.IMCMessage message) |
void |
sendViaIridium(java.lang.String destination,
pt.lsts.imc.IMCMessage message) |
protected void |
setEditMode(boolean b) |
void |
setFixedPosition(boolean fixedPosition) |
void |
setFixedSize(boolean fixedSize) |
protected void |
setPopupPosition(Popup.POSITION popupPosition) |
void |
setProperties(com.l2fprod.common.propertysheet.Property[] properties) |
void |
setResizable(boolean resizable) |
void |
setVisibility(boolean visibility)
Use this method to set the panel invisible (only visible at edition).
|
protected void |
writeChildToXml(org.dom4j.Element e)
Used to write the child elements for the configuration of node.
|
protected void |
writePropertiesToXml(org.dom4j.Element e)
Used to process the properties for this component from the configuration of node.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected javax.swing.JDialog dialog
protected javax.swing.AbstractAction popUpAction
public ConsolePanel(ConsoleLayout console)
console
- public ConsolePanel(ConsoleLayout console, boolean usedInsideAnotherConsolePanel)
ConsolePanel
(usedInsideAnotherConsolePanel should be true).
If you don't intend to use it, don't need to override it.console
- usedInsideAnotherConsolePanel
- protected final void activateComponents()
public javax.swing.JCheckBoxMenuItem addCheckMenuItem(java.lang.String itemPath, javax.swing.ImageIcon icon, CheckMenuChangeListener checkListener)
itemPath
- The path to the menu item separated by ">". Examples: icon
- The icon to be used in the menu item. actionListener
- The CheckMenuChangeListener
that will be warned on menu selection changesJCheckMenuItem
or null if an error as occurrred.public javax.swing.JMenu addMenu(java.lang.String itemPath, javax.swing.ImageIcon icon)
public javax.swing.JMenuItem addMenuItem(java.lang.String itemPath, javax.swing.ImageIcon icon, java.awt.event.ActionListener actionListener)
itemPath
- The path to the menu item separated by ">". Examples: icon
- The icon to be used in the menu item. actionListener
- The ActionListener
that will be warned on menu activationJMenuItem
or null if an error as occurred.public org.dom4j.Document asDocument()
asDocument
in interface XmlOutputMethods
public org.dom4j.Document asDocument(java.lang.String rootElementName)
asDocument
in interface XmlOutputMethods
public org.dom4j.Element asElement()
asElement
in interface XmlOutputMethods
public org.dom4j.Element asElement(java.lang.String rootElementName)
asElement
in interface XmlOutputMethods
public java.lang.String asXML()
XmlOutputMethods
FileUtil.saveToFile(String, String)
e afins. Isto porque ao gravar como UTF-8
os caracteres são adulterados guardando por exemplo "é" em 2 caracteres (ou seja pega nos dois caracteres UTF-8 e
transforma-os em 2 UTF-8s).asXML
in interface XmlOutputMethods
public java.lang.String asXML(java.lang.String rootElementName)
XmlOutputMethods
FileUtil.saveToFile(String, String)
e afins. Isto porque ao gravar como UTF-8
os caracteres são adulterados guardando por exemplo "é" em 2 caracteres (ou seja pega nos dois caracteres UTF-8 e
transforma-os em 2 UTF-8s).asXML
in interface XmlOutputMethods
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void clean()
public abstract void cleanSubPanel()
clean()
.protected final void deactivateComponents()
protected final ConsolePanel[] getChildren()
public final ConsoleLayout getConsole()
public java.lang.String getDescription()
public final boolean getEditMode()
public javax.swing.ImageIcon getImageIcon()
protected final MainPanel getMainpanel()
public java.lang.String getMainVehicleId()
public final java.lang.String getName()
getName
in class java.awt.Component
public com.l2fprod.common.propertysheet.DefaultProperty[] getProperties()
getProperties
in interface PropertiesProvider
public final java.lang.String getPropertiesDialogTitle()
getPropertiesDialogTitle
in interface PropertiesProvider
public java.lang.String[] getPropertiesErrors(com.l2fprod.common.propertysheet.Property[] properties)
getPropertiesErrors
in interface PropertiesProvider
protected final pt.lsts.imc.state.ImcSystemState getState()
public boolean getVisibility()
public void inDocument(org.dom4j.Document d)
inDocument
in interface XmlInOutMethods
public void inElement(org.dom4j.Element e)
inElement
in interface XmlInOutMethods
public void init()
public abstract void initSubPanel()
public void popupShown()
public void popupHidden()
public void parseXML(java.lang.String str)
parseXML
in interface XmlInOutMethods
public boolean isFixedPosition()
public boolean isFixedSize()
public boolean isResizable()
public final void mainVehicleChange(java.lang.String id)
#mainVehicleChangeNotification(String)
instead.public final void onMessage(pt.lsts.neptus.messages.listener.MessageInfo arg0, pt.lsts.imc.IMCMessage arg1)
onMessage
in interface pt.lsts.neptus.messages.listener.MessageListener<pt.lsts.neptus.messages.listener.MessageInfo,pt.lsts.imc.IMCMessage>
protected final void parentResized(java.awt.Dimension oldSize, java.awt.Dimension newSize)
public void post(java.lang.Object event)
event
- The Event to be posted to the console and forwarded to any subscribersSubscribe
protected final void recalculateRelativePosAndSize()
public void removeCheckMenuItem(java.lang.String itemPath)
public void removeMenuItem(java.lang.String itemPath)
public boolean send(pt.lsts.imc.IMCMessage message)
message
- public void sendViaIridium(java.lang.String destination, pt.lsts.imc.IMCMessage message)
public boolean sendToOtherCCUs(pt.lsts.imc.IMCMessage message)
public boolean send(java.lang.String destination, pt.lsts.imc.IMCMessage message)
destination
- message
- protected void setEditMode(boolean b)
public void setFixedPosition(boolean fixedPosition)
public void setFixedSize(boolean fixedSize)
protected void setPopupPosition(Popup.POSITION popupPosition)
public void setProperties(com.l2fprod.common.propertysheet.Property[] properties)
setProperties
in interface PropertiesProvider
public void setResizable(boolean resizable)
public void setVisibility(boolean visibility)
visibility
- Whether this panel is to be visible or not. Panels are always visible at edit timeprotected void readChildFromXml(org.dom4j.Element e)
e
- protected void writeChildToXml(org.dom4j.Element e)
e
- protected void readPropertiesFromXml(org.dom4j.Element e)
e
- protected void writePropertiesToXml(org.dom4j.Element e)
e
- Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.