layout progress
This commit is contained in:
parent
e5b953db84
commit
061c7c5d86
|
@ -43,10 +43,4 @@ public class WaveState {
|
|||
list.add(0, new EngineReport.UpDown(TriggerImage.angleToTime(prevUp), 0, TriggerImage.angleToTime(unusedDown + 720 * (3 + TriggerImage.EXTRA_COUNT)), 0));
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxTime() {
|
||||
if (list.isEmpty())
|
||||
return 0;
|
||||
return list.get(list.size() - 1).downTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.rusefi.ldmp.generated.TpsMeta;
|
|||
import com.rusefi.ldmp.generated.TriggerDecoderMeta;
|
||||
import com.rusefi.ui.livedocs.controls.Toolbox;
|
||||
import com.rusefi.ui.util.UiUtils;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.putgemin.VerticalFlowLayout;
|
||||
|
||||
|
@ -27,8 +28,11 @@ import java.util.List;
|
|||
import static com.rusefi.config.Field.niceToString;
|
||||
|
||||
public class LiveDocPanel {
|
||||
|
||||
private static final String CONSTRAINTS = "wrap, grow";
|
||||
|
||||
@NotNull
|
||||
public static JPanel getPanel(String title, String instancePrefix, final int id, Field[] values, Request[] content) {
|
||||
static JPanel getPanel(String title, String instancePrefix, final int id, Field[] values, Request[] content) {
|
||||
|
||||
ActionPanel ap = createComponents(title, content, values, instancePrefix);
|
||||
JPanel panel = ap.getPanel();
|
||||
|
@ -165,22 +169,22 @@ public class LiveDocPanel {
|
|||
|
||||
@NotNull
|
||||
public static JPanel createLiveDocumentationPanel() {
|
||||
JPanel liveDocs = new JPanel(new VerticalFlowLayout());
|
||||
JPanel liveDocs = new JPanel(new MigLayout("gap 0, insets 0"));
|
||||
|
||||
liveDocs.add(getPanel("Coolant Sensor", "CLT", Fields.LDS_CLT_INDEX,
|
||||
ThermistorState.VALUES, ThermistorsMeta.CONTENT));
|
||||
ThermistorState.VALUES, ThermistorsMeta.CONTENT), CONSTRAINTS);
|
||||
|
||||
liveDocs.add(getPanel("Intake Air Sensor", "IAT", Fields.LDS_IAT_INDEX,
|
||||
ThermistorState.VALUES, ThermistorsMeta.CONTENT));
|
||||
ThermistorState.VALUES, ThermistorsMeta.CONTENT), CONSTRAINTS);
|
||||
|
||||
liveDocs.add(getPanel("Throttle Position Sensor", "", Fields.LDS_ENGINE_STATE_INDEX,
|
||||
EngineState.VALUES, TpsMeta.TPS_SECTION));
|
||||
EngineState.VALUES, TpsMeta.TPS_SECTION), CONSTRAINTS);
|
||||
|
||||
liveDocs.add(getPanel("tCharge", "", Fields.LDS_ENGINE_STATE_INDEX,
|
||||
EngineState.VALUES, SpeedDensityMeta.CONTENT));
|
||||
EngineState.VALUES, SpeedDensityMeta.CONTENT), CONSTRAINTS);
|
||||
|
||||
liveDocs.add(getPanel("Trigger", "", Fields.LDS_TRIGGER_INDEX,
|
||||
TriggerState.VALUES, TriggerDecoderMeta.CONTENT));
|
||||
TriggerState.VALUES, TriggerDecoderMeta.CONTENT), CONSTRAINTS);
|
||||
|
||||
return liveDocs;
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@ public class LiveDocsSandbox {
|
|||
public static void main(String[] args) {
|
||||
comment.setForeground(Color.blue);
|
||||
|
||||
JPanel panels = new JPanel(new MigLayout("gap 0, insets 0"));
|
||||
JPanel panels = new JPanel(new MigLayout("fillx, gap 0, insets 0"));
|
||||
panels.add(LiveDocPanel.getPanel("Coolant Sensor", "CLT", LDS_CLT_INDEX, ThermistorState.VALUES, ThermistorsMeta.CONTENT), "wrap");
|
||||
panels.add(LiveDocPanel.getPanel("Intake Air Sensor", "CLT", LDS_CLT_INDEX, ThermistorState.VALUES, ThermistorsMeta.CONTENT), "wrap");
|
||||
|
||||
panels.add(getTChargePanel(), "wrap");
|
||||
panels.add(getTChargePanel(), "wrap, grow");
|
||||
|
||||
panels.add(comment);
|
||||
|
||||
|
|
Loading…
Reference in New Issue