package art.client.GUI.components.devices.window.colors.rtz32.tables.main;
|
|
import art.client.GUI.components.devices.window.colors.rtz32.tables.Table;
|
import art.library.gui.flat.FlatPanel;
|
import art.library.gui.flat.FlatSplitPane;
|
import art.library.gui.flat.FlatTableInput;
|
import art.library.gui.flat.FlatTitle;
|
import art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerConfiguration;
|
import art.servers.Shared;
|
import java.awt.BorderLayout;
|
import java.awt.Dimension;
|
import java.awt.event.ComponentAdapter;
|
import java.awt.event.ComponentEvent;
|
import javax.swing.JSplitPane;
|
import javax.swing.SwingConstants;
|
|
public class Table6 extends Table
|
{
|
private static String[] SYNCHRONISM_TYPE = new String[]
|
{
|
Shared.getMessage("Unsynchronizable"),
|
Shared.getMessage("Synchronism type 1"),
|
Shared.getMessage("Synchronism type 2"),
|
Shared.getMessage("Synchronism type 3")
|
};
|
|
private static String[] SYNCHRONISM_MODE = new String[]
|
{
|
Shared.getMessage("Normal"),
|
Shared.getMessage("Master/Slave"),
|
};
|
|
private static String[] SYNCHRONISM_SEMIACTUATED = new String[]
|
{
|
Shared.getMessage("Normal"),
|
Shared.getMessage("Semiactuated, type 1"),
|
Shared.getMessage("Semiactuated, type 2"),
|
Shared.getMessage("Semiactuated, type 2"),
|
};
|
|
|
|
public Table6(RTZ32_ControllerConfiguration configuration)
|
{
|
super(configuration, "table6.html");
|
initialise();
|
reload(configuration);
|
}
|
|
|
public void editable(boolean value)
|
{
|
if (tableinput != null) tableinput.setEditable(value);
|
if (table != null) table.setEditable(value);
|
}
|
|
|
public void reload(RTZ32_ControllerConfiguration configuration)
|
{
|
super.reload(configuration);
|
|
try
|
{
|
tableinput.setFieldIndex(Shared.getMessage("Synchronism type"), configuration.rtz32.operationMode, "synchronismType");
|
tableinput.setField(Shared.getMessage("Synchronism (table 78)"), configuration.rtz32.operationMode, "synchronismTable78");
|
tableinput.setFieldIndex(Shared.getMessage("Synchronism mode"), configuration.rtz32.operationMode, "synchronismMode");
|
tableinput.setField(Shared.getMessage("Slave synchronizable"), configuration.rtz32.operationMode, "slaveSynchronizable");
|
tableinput.setField(Shared.getMessage("Master synchronizable"), configuration.rtz32.operationMode, "masterSynchronizable");
|
tableinput.setFieldIndex(Shared.getMessage("Semiactuade mode"), configuration.rtz32.operationMode, "semiactuatedMode");
|
tableinput.setField(Shared.getMessage("Extension (synchronism type 1)"), configuration.rtz32.operationMode, "cycleExtensionSynchronismType1");
|
tableinput.setField(Shared.getMessage("Reduction (synchronism type 1)"), configuration.rtz32.operationMode, "cycleReductionSynchronismType1");
|
tableinput.setField(Shared.getMessage("Extension (synchronism type 2)"), configuration.rtz32.operationMode, "inhibitionExtendsSynchronismType2");
|
tableinput.setField(Shared.getMessage("Extension (synchronism type 3)"),configuration.rtz32.operationMode, "inhibitionExtendsSynchronismType3");
|
|
tableinput.setValueIndex(Shared.getMessage("Synchronism type"), configuration.rtz32.operationMode.synchronismType);
|
tableinput.setValue(Shared.getMessage("Synchronism (table 78)"), configuration.rtz32.operationMode.synchronismTable78);
|
tableinput.setValueIndex(Shared.getMessage("Synchronism mode"), configuration.rtz32.operationMode.synchronismMode);
|
tableinput.setValue(Shared.getMessage("Slave synchronizable"), configuration.rtz32.operationMode.slaveSynchronizable);
|
tableinput.setValue(Shared.getMessage("Master synchronizable"), configuration.rtz32.operationMode.masterSynchronizable);
|
tableinput.setValueIndex(Shared.getMessage("Semiactuade mode"), configuration.rtz32.operationMode.semiactuatedMode);
|
tableinput.setValue(Shared.getMessage("Extension (synchronism type 1)"), configuration.rtz32.operationMode.cycleExtensionSynchronismType1);
|
tableinput.setValue(Shared.getMessage("Reduction (synchronism type 1)"), configuration.rtz32.operationMode.cycleReductionSynchronismType1);
|
tableinput.setValue(Shared.getMessage("Extension (synchronism type 2)"), configuration.rtz32.operationMode.inhibitionExtendsSynchronismType2);
|
tableinput.setValue(Shared.getMessage("Extension (synchronism type 3)"),configuration.rtz32.operationMode.inhibitionExtendsSynchronismType3);
|
}
|
catch (Exception exception)
|
{
|
}
|
}
|
|
|
private void initialise()
|
{
|
FlatPanel panel1 = new FlatPanel();
|
{
|
tableinput = new FlatTableInput(250);
|
{
|
tableinput.addComboBox(Shared.getMessage("Synchronism type"), SYNCHRONISM_TYPE, 24);
|
tableinput.addCheckBox(Shared.getMessage("Synchronism (table 78)"), Shared.getMessage("Enabled"), Shared.getMessage("Disabled"), 24);
|
tableinput.addComboBox(Shared.getMessage("Synchronism mode"),SYNCHRONISM_MODE, 24);
|
tableinput.addCheckBox(Shared.getMessage("Slave synchronizable"), Shared.getMessage("Yes"), Shared.getMessage("No"), 24);
|
tableinput.addCheckBox(Shared.getMessage("Master synchronizable"), Shared.getMessage("Yes"), Shared.getMessage("No"), 24);
|
tableinput.addComboBox(Shared.getMessage("Semiactuade mode"), SYNCHRONISM_SEMIACTUATED, 24);
|
tableinput.addNumericTextField(Shared.getMessage("Extension (synchronism type 1)"), 0, 100, 24);
|
tableinput.addNumericTextField(Shared.getMessage("Reduction (synchronism type 1)"), 0, 100, 24);
|
tableinput.addNumericTextField(Shared.getMessage("Extension (synchronism type 2)"), 0, 100, 24);
|
tableinput.addNumericTextField(Shared.getMessage("Extension (synchronism type 3)"), 0, 100, 24);
|
|
tableinput.setMeasurementUnits(Shared.getMessage("Extension (synchronism type 1)"), Shared.getMessage("%"), 100, SwingConstants.CENTER);
|
tableinput.setMeasurementUnits(Shared.getMessage("Reduction (synchronism type 1)"), Shared.getMessage("%"), 100, SwingConstants.CENTER);
|
tableinput.setMeasurementUnits(Shared.getMessage("Extension (synchronism type 2)"), Shared.getMessage("%"), 100, SwingConstants.CENTER);
|
tableinput.setMeasurementUnits(Shared.getMessage("Extension (synchronism type 3)"), Shared.getMessage("%"), 100, SwingConstants.CENTER);
|
|
tableinput.setEditable(false);
|
|
}
|
|
panel1.setLayout(new BorderLayout());
|
panel1.add(tableinput.getScrollPane(), BorderLayout.CENTER);
|
panel1.setRaisedBorder(0,0,1,1);
|
}
|
|
FlatSplitPane flatSplitPane1 = new FlatSplitPane();
|
{
|
panel1.setMinimumSize(new Dimension(0, 0));
|
panel1.setPreferredSize(new Dimension(550,0));
|
scrollpane.setMinimumSize(new Dimension(0, 0));
|
scrollpane.setPreferredSize(new Dimension(0,0));
|
|
flatSplitPane1.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
|
flatSplitPane1.setOneTouchExpandable();
|
flatSplitPane1.changeDividerSize(16);
|
flatSplitPane1.setLeftComponent(panel1);
|
flatSplitPane1.setRightComponent(scrollpane);
|
|
flatSplitPane1.addComponentListener(new ComponentAdapter()
|
{
|
public void componentResized(ComponentEvent e)
|
{
|
FlatSplitPane flatSplitPane1 = (FlatSplitPane)e.getSource();
|
flatSplitPane1.setDividerLocation(550);
|
}
|
});
|
}
|
|
this.setLayout(new BorderLayout());
|
this.add(new FlatTitle(Shared.getMessage("Operating mode and synchronism"), 32), BorderLayout.NORTH);
|
this.add(flatSplitPane1, BorderLayout.CENTER);
|
}
|
|
|
|
|
}
|