Skip to content

Commit

Permalink
edit gui settings, disable some controls that are not impl yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon committed Sep 28, 2023
1 parent 6f3c2a3 commit e21b975
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void createUserInterface() {

// main control area
final int width = 900;
final int height = 700;
final int height = 600;
tabPanel_ = new TabPanel(model_, this, width, height);

// add ui elements to the panel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.micromanager.lightsheetmanager.gui.tabs;

import java.awt.Dimension;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.Future;
import javax.swing.SwingUtilities;
Expand Down Expand Up @@ -84,7 +85,7 @@ private void createUserInterface() {
model_.acquisitions().settings();

Panel.setMigLayoutDefault(
"",
"insets 10 10 10 10",
"[]5[]",
"[]5[]"
);
Expand Down Expand Up @@ -119,6 +120,11 @@ private void createUserInterface() {

// acquisition buttons
pnlButtons_ = new Panel();
pnlButtons_.setMigLayout(
"",
"[]24[]",
""
);

ToggleButton.setDefaultSize(120, 30);
btnRunAcquisition_ = new ToggleButton(
Expand All @@ -144,6 +150,8 @@ private void createUserInterface() {
cbxUseChannels_ = new CheckBox(
"Channels", acqSettings.isUsingChannels());
pnlChannelTable_ = new ChannelTablePanel(model_, cbxUseChannels_);
pnlChannelTable_.setMaximumSize(new Dimension(300, 400));

// disable elements based on acqSettings
if (!acqSettings.isUsingChannels()) {
pnlChannelTable_.setItemsEnabled(false);
Expand Down Expand Up @@ -199,7 +207,7 @@ private void createUserInterface() {
add(pnlLeft, "");
add(pnlCenter, "");
add(pnlRight_, "wrap");
add(pnlButtons_, "span 3");
add(pnlButtons_, "span 3, gaptop 100");
}

private void acqFinishedCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ private void createUserInterface() {
btnEditPositionList_ = new Button("Edit Position List", 120, 24);
btnOpenXYZGrid_ = new Button("XYZ Grid", 80, 24);

btnOpenXYZGrid_.setEnabled(false);

add(btnEditPositionList_, "");
add(btnOpenXYZGrid_, "wrap");
add(lblPostMoveDelay_, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ private void createEventHandlers() {
});
break;
case SCAPE:
btnInvertedPath_.setText("Preview");
btnInvertedPath_.registerListener(e -> {
// TODO: make this work, needs Device Adapter pull request and name for camera...
closeLiveModeWindow();
final String cameraName = model_.devices()
.getDevice("InvertedCamera").getDeviceName();
.getDevice("PreviewCamera").getDeviceName();
try {
model_.studio().core().setCameraDevice(cameraName);
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ public SetupPanel(final LightSheetManagerModel model, final int pathNum) {
excitationPanel_ = new ExcitationPanel(model_);
cameraPanel_ = new CameraPanel(model_);

leftPanel_.add(joystickPanel_, "growx, wrap");
// TODO: add joystick panel back in
//leftPanel_.add(joystickPanel_, "growx, wrap");
leftPanel_.add(excitationPanel_, "growx, wrap");
if (model_.devices().getDeviceAdapter().getMicroscopeGeometry() == GeometryType.SCAPE) {
singleAxisPanel_ = new SingleAxisPanel(model_);
leftPanel_.add(singleAxisPanel_, "growx, wrap");
//leftPanel_.add(singleAxisPanel_, "growx, wrap");
}
leftPanel_.add(cameraPanel_, "growx, wrap");

Expand Down

0 comments on commit e21b975

Please sign in to comment.