Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit gui settings, disable some controls that are not impl yet #156

Merged
merged 1 commit into from
Sep 28, 2023
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 @@ -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