Skip to content
Snippets Groups Projects
Commit 92b5c415 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

- Every IComponent declares, through its new method...

- Every IComponent declares, through its new method shouldReceiveDataInDrawingThread(), whether it should receive its data in drawing thread (JAVAAPI-623).
- Code reworked to respect more java standards.
parent c8ab8933
No related branches found
No related tags found
No related merge requests found
......@@ -49,14 +49,14 @@ import fr.soleil.model.scanserver.CurrentScanDataModel;
*/
public class ScanServerStatusBar extends AbstractTangoBox {
private static final long serialVersionUID = -6600067056280163015L;
private static final long serialVersionUID = -1761729788819376572L;
/**
* small Font
*/
private final static CometeFont smallFont = new CometeFont("Dialog", Font.PLAIN, 10);
private static final CometeFont SMALL_FONT = new CometeFont("Dialog", Font.PLAIN, 10);
private final JButton scanServerLabel = new JButton();
private static final JButton SCAN_SERVER_LABEL = new JButton();
/**
* Map of Label
......@@ -156,10 +156,10 @@ public class ScanServerStatusBar extends AbstractTangoBox {
cell00.gridy = 0;
cell00.gridwidth = 2;
cell00.insets = defaultInset;
add(scanServerLabel, cell00);
add(SCAN_SERVER_LABEL, cell00);
scanServerLabel.setToolTipText("Open control panel");
scanServerLabel.addActionListener(new ActionListener() {
SCAN_SERVER_LABEL.setToolTipText("Open control panel");
SCAN_SERVER_LABEL.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
......@@ -186,7 +186,7 @@ public class ScanServerStatusBar extends AbstractTangoBox {
statusField.setMinimumSize(new Dimension(200, 15));
statusField.setColumns(20);
statusField.setScrollStepsTime(20);
statusField.setCometeFont(smallFont);
statusField.setCometeFont(SMALL_FONT);
statusField.setEditable(false);
statusField.setHorizontalAlignment(JLabel.LEFT);
statusField.setScrollMode(ScrollMode.PENDULAR);
......@@ -377,6 +377,10 @@ public class ScanServerStatusBar extends AbstractTangoBox {
return EDTManager.INSTANCE;
}
@Override
public boolean shouldReceiveDataInDrawingThread() {
return true;
}
};
return result;
}
......@@ -457,7 +461,7 @@ public class ScanServerStatusBar extends AbstractTangoBox {
setWidgetModel(statusField, stringBox, generateAttributeKey("Status"));
setStateModel();
scanServerLabel.setText(model);
SCAN_SERVER_LABEL.setText(model);
labelMap.get(CurrentScanDataModel.SCAN_STATE).setToolTipText(model);
Set<String> keySet = labelMap.keySet();
Iterator<String> keyIterator = keySet.iterator();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment