Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import net.miginfocom.swing.MigLayout;

import org.micromanager.internal.utils.WindowPositioning;
import org.micromanager.lightsheetmanager.api.data.GeometryType;
import org.micromanager.lightsheetmanager.api.data.LightSheetType;
import org.micromanager.lightsheetmanager.gui.components.Label;
import org.micromanager.lightsheetmanager.gui.data.Icons;
import org.micromanager.lightsheetmanager.gui.tabs.TabPanel;
import org.micromanager.lightsheetmanager.gui.utils.WindowUtils;
import org.micromanager.internal.utils.WindowPositioning;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Font;
import java.util.Objects;

Expand Down Expand Up @@ -85,8 +85,10 @@ private void createErrorUserInterface() {
"[]10[]"
));

final Label lblTitle = new Label(LightSheetManagerPlugin.menuName, Font.BOLD, 16);
final Label lblError = new Label(model_.setupErrorMessage(), Font.BOLD, 14);
final JLabel lblTitle = new JLabel(LightSheetManagerPlugin.menuName);
lblTitle.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 16));
final JLabel lblError = new JLabel(model_.setupErrorMessage());
lblError.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 14));

add(lblTitle, "wrap");
add(lblError, "");
Expand All @@ -108,7 +110,7 @@ private void createUserInterface() {
final int height = 680;
tabPanel_ = new TabPanel(model_, this, width, height);

final Label lblTitle = new Label(LightSheetManagerPlugin.menuName, Font.BOLD, 20);
final JLabel lblTitle = new JLabel(LightSheetManagerPlugin.menuName);
lblTitle.setFont(new Font(Font.MONOSPACED, Font.BOLD, 20));

// restore the polling state from settings
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.micromanager.lightsheetmanager.gui.tabs;

import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.api.data.AutofocusMode;
import org.micromanager.lightsheetmanager.api.data.AutofocusType;
import org.micromanager.lightsheetmanager.api.internal.ScapeAcquisitionSettings;
import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.gui.components.Button;
import org.micromanager.lightsheetmanager.gui.components.CheckBox;
import org.micromanager.lightsheetmanager.gui.components.ComboBox;
import org.micromanager.lightsheetmanager.gui.components.Label;
import org.micromanager.lightsheetmanager.gui.components.ListeningPanel;
import org.micromanager.lightsheetmanager.gui.components.Panel;
import org.micromanager.lightsheetmanager.gui.components.Spinner;

import javax.swing.JLabel;
import java.awt.Font;
import java.util.Objects;

Expand All @@ -38,8 +38,8 @@ public class AutofocusTab extends Panel implements ListeningPanel {
private Spinner spnMaxOffset_;

// autofocus options during setup
private Label lblMaxOffsetSetup_;
private Label lblMaxOffsetSetupUm_;
private JLabel lblMaxOffsetSetup_;
private JLabel lblMaxOffsetSetupUm_;
private Spinner spnMaxOffsetSetup_;
private CheckBox cbxAutoUpdateFocusFound_;

Expand All @@ -55,7 +55,8 @@ public void createUserInterface() {
final ScapeAcquisitionSettings acqSettings =
model_.acquisitions().settings();

final Label lblTitle = new Label("Autofocus Settings", Font.BOLD, 18);
final JLabel lblTitle = new JLabel("Autofocus Settings");
lblTitle.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 18));

setMigLayout(
"",
Expand All @@ -71,11 +72,11 @@ public void createUserInterface() {
final Panel pnlMoveCorrection = new Panel("Movement Correction Options");

// general autofocus options
final Label lblNumImages = new Label("Number of Images:");
final Label lblStepSizeUm = new Label("Step Size [µm]:");
final Label lblMode = new Label("Mode:");
final Label lblScoringAlgorithm = new Label("Scoring algorithm:");
// final Label lblToleranceUm = new Label("Tolerance [µm]");
final JLabel lblNumImages = new JLabel("Number of Images:");
final JLabel lblStepSizeUm = new JLabel("Step Size [µm]:");
final JLabel lblMode = new JLabel("Mode:");
final JLabel lblScoringAlgorithm = new JLabel("Scoring algorithm:");
// final JLabel lblToleranceUm = new JLabel("Tolerance [µm]");

cbxShowImages_ = new CheckBox("Show Images", 12,
acqSettings.autofocus().showImages(), CheckBox.RIGHT);
Expand All @@ -98,10 +99,10 @@ public void createUserInterface() {
btnRunAutofocus_.setEnabled(false); // FIXME: impl autofocus

// autofocus options during acquisition
final Label lblTimePoints = new Label("time points");
final Label lblMaxOffsetActive = new Label("Max offset change: ");
final Label lblAutofocusEveryX = new Label("Autofocus every ");
final Label lblAutofocusChannel = new Label("Autofocus channel:");
final JLabel lblTimePoints = new JLabel("time points");
final JLabel lblMaxOffsetActive = new JLabel("Max offset change: ");
final JLabel lblAutofocusEveryX = new JLabel("Autofocus every ");
final JLabel lblAutofocusChannel = new JLabel("Autofocus channel:");

cbxAutofocusEveryPass_ = new CheckBox("Autofocus every stage pass", 12, false, CheckBox.RIGHT);
cbxAutofocusBeforeAcq_ = new CheckBox("Autofocus before starting acquisition", 12, false, CheckBox.RIGHT);
Expand All @@ -111,18 +112,18 @@ public void createUserInterface() {
spnMaxOffset_ = Spinner.createIntegerSpinner(3, 0, 10, 1);

// autofocus options during setup
lblMaxOffsetSetup_ = new Label("Max offset change: ");
lblMaxOffsetSetupUm_ = new Label("µm (±)");
lblMaxOffsetSetup_ = new JLabel("Max offset change: ");
lblMaxOffsetSetupUm_ = new JLabel("µm (±)");
cbxAutoUpdateFocusFound_ = new CheckBox("Automatically update offset if focus found", 12, false, CheckBox.RIGHT);
spnMaxOffsetSetup_ = Spinner.createIntegerSpinner(3, 0, 10, 1);
setSetupOptionsState(false);

// movement correction options
final Label lblTimePoints2 = new Label("time points"); // TODO: share this value?
final Label lblCorrectEveryX = new Label("Correct every");
final Label lblChannel = new Label("Channel:");
final Label lblMaxDistance = new Label("Max distance:");
final Label lblMinMovement = new Label("Min movement:");
final JLabel lblTimePoints2 = new JLabel("time points"); // TODO: share this value?
final JLabel lblCorrectEveryX = new JLabel("Correct every");
final JLabel lblChannel = new JLabel("Channel:");
final JLabel lblMaxDistance = new JLabel("Max distance:");
final JLabel lblMinMovement = new JLabel("Min movement:");
final Spinner spnCorrectEveryX = Spinner.createIntegerSpinner(100, 0, 1000, 1);
final Spinner spnMaxDistance = Spinner.createIntegerSpinner(96, 0, 100, 1);
final Spinner spnMinMovement = Spinner.createDoubleSpinner(1.0, 0.0, 10.0, 0.5);
Expand Down Expand Up @@ -156,7 +157,7 @@ public void createUserInterface() {
pnlAcqActiveOptions.add(cmbAutofocusChannel_, "wrap");
pnlAcqActiveOptions.add(lblMaxOffsetActive, "");
pnlAcqActiveOptions.add(spnMaxOffset_, "");
pnlAcqActiveOptions.add(new Label("µm (±)"), "");
pnlAcqActiveOptions.add(new JLabel("µm (±)"), "");

// autofocus options during setup
pnlAcqSetupOptions.add(cbxAutoUpdateFocusFound_, "span 3, wrap");
Expand All @@ -172,10 +173,10 @@ public void createUserInterface() {
pnlMoveCorrection.add(cmbChannel, "wrap");
pnlMoveCorrection.add(lblMaxDistance, "");
pnlMoveCorrection.add(spnMaxDistance, "");
pnlMoveCorrection.add(new Label("µm (±)"), "wrap");
pnlMoveCorrection.add(new JLabel("µm (±)"), "wrap");
pnlMoveCorrection.add(lblMinMovement, "");
pnlMoveCorrection.add(spnMinMovement, "");
pnlMoveCorrection.add(new Label("µm (±)"), "");
pnlMoveCorrection.add(new JLabel("µm (±)"), "");

// add panels to tab
add(pnlGeneralOptions, "");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.micromanager.lightsheetmanager.gui.tabs;

import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.gui.components.Button;
import org.micromanager.lightsheetmanager.gui.components.Label;
import org.micromanager.lightsheetmanager.gui.components.ListeningPanel;
import org.micromanager.lightsheetmanager.gui.components.Panel;
import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.gui.components.Spinner;
import org.micromanager.lightsheetmanager.model.devices.cameras.CameraBase;

import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Rectangle;
import java.util.Objects;
Expand Down Expand Up @@ -36,14 +36,15 @@ public class CameraTab extends Panel implements ListeningPanel {
}

private void createUserInterface() {
final Label lblTitle = new Label("Camera Settings", Font.BOLD, 18);
final JLabel lblTitle = new JLabel("Camera Settings");
lblTitle.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 18));

final Panel pnlROI = new Panel("Imaging ROI");

final Label lblOffsetX = new Label("Offset X:");
final Label lblOffsetY = new Label("Offset Y:");
final Label lblWidth = new Label("Width:");
final Label lblHeight = new Label("Height:");
final JLabel lblOffsetX = new JLabel("Offset X:");
final JLabel lblOffsetY = new JLabel("Offset Y:");
final JLabel lblWidth = new JLabel("Width:");
final JLabel lblHeight = new JLabel("Height:");

btnUnchangedROI_ = new Button("Unchanged", 140, 30);
btnFullROI_ = new Button("Full", 70, 30);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.micromanager.lightsheetmanager.gui.tabs;

import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.api.data.CameraMode;
import org.micromanager.lightsheetmanager.gui.components.Label;
import org.micromanager.lightsheetmanager.gui.components.ListeningPanel;
import org.micromanager.lightsheetmanager.gui.components.Panel;
import org.micromanager.lightsheetmanager.gui.tabs.setup.SetupPanel;
import org.micromanager.lightsheetmanager.LightSheetManager;

import javax.swing.JLabel;
import java.awt.Font;
import java.util.Objects;

Expand All @@ -26,7 +26,8 @@ public SetupPathTab(final LightSheetManager model, final int pathNum) {
private void createUserInterface() {
final String title = (model_.devices().adapter().numImagingPaths() > 1)
? ("Setup Path " + pathNum_) : "Setup Path";
final Label lblTitle = new Label(title, Font.BOLD, 16);
final JLabel lblTitle = new JLabel(title);
lblTitle.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 16));

setupPanel_ = new SetupPanel(model_, pathNum_);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
package org.micromanager.lightsheetmanager.gui.tabs.acquisition;

import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.api.AcquisitionSettings;
import org.micromanager.lightsheetmanager.api.TimingSettings;
import org.micromanager.lightsheetmanager.api.internal.ScapeAcquisitionSettings;
import org.micromanager.lightsheetmanager.gui.components.CheckBox;
import org.micromanager.lightsheetmanager.gui.components.Label;
import org.micromanager.lightsheetmanager.gui.components.Panel;
import org.micromanager.lightsheetmanager.gui.components.SettingsListener;
import org.micromanager.lightsheetmanager.gui.components.Spinner;
import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.model.utils.NumberUtils;

import javax.swing.JLabel;
import java.util.Objects;

public class AdvancedTimingPanel extends Panel implements SettingsListener {

private Label lblDelayBeforeScan_;
private Label lblScansPerSlice_;
private Label lblScanDuration_;
private Label lblDelayBeforeLaser_;
private Label lblDelayBeforeCamera_;
private Label lblLaserTriggerDuration_;
private Label lblCameraTriggerDuration_;
private Label lblCameraExposure_;
private JLabel lblDelayBeforeScan_;
private JLabel lblScansPerSlice_;
private JLabel lblScanDuration_;
private JLabel lblDelayBeforeLaser_;
private JLabel lblDelayBeforeCamera_;
private JLabel lblLaserTriggerDuration_;
private JLabel lblCameraTriggerDuration_;
private JLabel lblCameraExposure_;

private Spinner spnDelayBeforeScan_;
private Spinner spnDelayBeforeLaser_;
Expand Down Expand Up @@ -52,14 +52,14 @@ private void createUserInterface() {
"[]5[]"
);

lblDelayBeforeScan_ = new Label("Delay Before Scan [ms]: ");
lblScansPerSlice_ = new Label("Scans Per Slice: ");
lblScanDuration_ = new Label("Scan Duration [ms]: ");
lblDelayBeforeLaser_ = new Label("Delay Before Laser [ms]: ");
lblDelayBeforeCamera_ = new Label("Delay Before Camera [ms]: ");
lblLaserTriggerDuration_ = new Label("Laser Trigger Duration [ms]: ");
lblCameraTriggerDuration_ = new Label("Camera Trigger Duration [ms]: ");
lblCameraExposure_ = new Label("Camera Exposure [ms]: ");
lblDelayBeforeScan_ = new JLabel("Delay Before Scan [ms]: ");
lblScansPerSlice_ = new JLabel("Scans Per Slice: ");
lblScanDuration_ = new JLabel("Scan Duration [ms]: ");
lblDelayBeforeLaser_ = new JLabel("Delay Before Laser [ms]: ");
lblDelayBeforeCamera_ = new JLabel("Delay Before Camera [ms]: ");
lblLaserTriggerDuration_ = new JLabel("Laser Trigger Duration [ms]: ");
lblCameraTriggerDuration_ = new JLabel("Camera Trigger Duration [ms]: ");
lblCameraExposure_ = new JLabel("Camera Exposure [ms]: ");

final TimingSettings timingSettings = model_.acquisitions().settings().timing();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package org.micromanager.lightsheetmanager.gui.tabs.acquisition;

import org.micromanager.lightsheetmanager.gui.components.Label;
import org.micromanager.lightsheetmanager.gui.components.Panel;
import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.gui.components.Panel;

import javax.swing.JLabel;
import java.util.Objects;

public class DurationPanel extends Panel {

private Label lblSliceTimeValue_;
private Label lblVolumeTimeValue_;
private Label lblTotalTimeValue_;
private JLabel lblSliceTimeValue_;
private JLabel lblVolumeTimeValue_;
private JLabel lblTotalTimeValue_;

public DurationPanel(final LightSheetManager model) {
super("Durations");
Expand All @@ -24,15 +23,15 @@ private void createUserInterface() {
// prevent panel from moving when values change
setAbsoluteSize(120, 95);

lblSliceTimeValue_ = new Label("0.0 ms");
lblVolumeTimeValue_ = new Label("0.0 ms");
lblTotalTimeValue_ = new Label("0.0 s");
lblSliceTimeValue_ = new JLabel("0.0 ms");
lblVolumeTimeValue_ = new JLabel("0.0 ms");
lblTotalTimeValue_ = new JLabel("0.0 s");

add(new Label("Slice:"), "");
add(new JLabel("Slice:"), "");
add(lblSliceTimeValue_, "wrap");
add(new Label("Volume:"), "");
add(new JLabel("Volume:"), "");
add(lblVolumeTimeValue_, "wrap");
add(new Label("Total:"), "");
add(new JLabel("Total:"), "");
add(lblTotalTimeValue_, "");
}

Expand Down
Loading
Loading