use of java.awt.Cursor in project vcell by virtualcell.
the class PythonConfigurationPanel2 method initialize.
private void initialize() {
setLayout(new BorderLayout());
Border margin = new EmptyBorder(5, 3, 1, 1);
Border loweredEtchedBorder = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
TitledBorder panelBorder = BorderFactory.createTitledBorder(loweredEtchedBorder, " Python Properties ");
panelBorder.setTitleJustification(TitledBorder.LEFT);
panelBorder.setTitlePosition(TitledBorder.TOP);
panelBorder.setTitleFont(getFont().deriveFont(Font.BOLD));
JPanel mainPanel = new JPanel();
mainPanel.setBorder(new CompoundBorder(margin, panelBorder));
mainPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.weighty = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridheight = 1;
add(mainPanel, BorderLayout.CENTER);
JPanel upper = new JPanel();
// TitledBorder titleLeft = BorderFactory.createTitledBorder(loweredEtchedBorder, " Original Physiology ");
// titleLeft.setTitleJustification(TitledBorder.LEFT);
// titleLeft.setTitlePosition(TitledBorder.TOP);
// upper.setBorder(titleLeft);
upper.setLayout(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 0.5;
gbc.weighty = 1.0;
gbc.fill = GridBagConstraints.BOTH;
// top, left, bottom, right
gbc.insets = new Insets(5, 2, 2, 3);
mainPanel.add(upper, gbc);
// ============================================= Populating the upper group box =================
String managedMiniconda = new File(ResourceUtil.getVcellHome(), "Miniconda").getAbsolutePath();
String vcellPythonText = "<html>" + "Python is required for parameter estimation and other analysis.<br>" + "VCell manages a dedicated Miniconda python installation " + "at <font color=#8C001A>" + managedMiniconda + "</font>.<br>" + "</html>";
String vcellPythonText2 = "<html>" + "For more information about Miniconda, see:" + "</html>";
websiteLabel.setText(textContinuum);
websiteLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
int gridy = 0;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.weightx = 1;
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
gbc.insets = new Insets(4, 4, 2, 10);
upper.add(new JLabel(vcellPythonText), gbc);
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.weightx = 1;
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
gbc.insets = new Insets(10, 4, 0, 10);
upper.add(new JLabel(vcellPythonText2), gbc);
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.weightx = 1;
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
gbc.insets = new Insets(0, 4, 2, 10);
upper.add(websiteLabel, gbc);
// --------------------------------------------------
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.weightx = 1;
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(4, 4, 4, 10);
upper.add(new JLabel(""), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = gridy;
// gbc.weightx = 1;
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
// top, left, bottom, right
gbc.insets = new Insets(4, 4, 4, 10);
upper.add(getTestConfigurationButton(), gbc);
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = gridy;
// gbc.weightx = 1;
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
gbc.insets = new Insets(4, 4, 4, 10);
upper.add(getInstallPythonButton(), gbc);
// Dimension size = getTestConfigurationButton().getPreferredSize();
// getTestConfigurationButton().setPreferredSize(size);
// getTestConfigurationButton().setMaximumSize(size);
// getInstallPythonButton().setSize(size);
// getInstallPythonButton().setPreferredSize(size);
// getInstallPythonButton().setMaximumSize(size);
// --------------------------------------------------------
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
// fake cell used for filling all the vertical empty space
gbc.weighty = 1;
gbc.anchor = GridBagConstraints.WEST;
gbc.insets = new Insets(4, 4, 4, 10);
upper.add(new JLabel(""), gbc);
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.weightx = 1;
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.EAST;
gbc.insets = new Insets(4, 4, 2, 10);
upper.add(testConfigurationResults, gbc);
getTestConfigurationButton().addActionListener(eventHandler);
getInstallPythonButton().addActionListener(eventHandler);
addFocusListener(eventHandler);
websiteLabel.addMouseListener(eventHandler);
}
use of java.awt.Cursor in project vcell by virtualcell.
the class ImagePlaneManagerPanel method setToolCursor.
/**
* Insert the method's description here.
* Creation date: (7/4/2003 12:04:20 PM)
*/
private void setToolCursor() {
Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
if (getCurveEditorTool() != null) {
if (getCurveEditorTool().getTool() == cbit.vcell.geometry.gui.CurveEditorTool.TOOL_PAN) {
cursor = panCursor;
// cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
} else if (getCurveEditorTool().getTool() == cbit.vcell.geometry.gui.CurveEditorTool.TOOL_ZOOM) {
cursor = zoomCursor;
// cursor = Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR);
}
}
org.vcell.util.BeanUtils.setCursorThroughout(getImagePaneScroller1(), cursor);
}
use of java.awt.Cursor in project n2a by frothga.
the class FixedParameterSpacePanel method dragGestureRecognized.
public void dragGestureRecognized(DragGestureEvent event) {
Cursor cursor = null;
SimpleTree list = (SimpleTree) event.getComponent();
TreePath[] paths = list.getSelectionPaths();
if (paths == null) {
return;
}
List<ParameterBundle> bundles = getSelectedParamsAsBundles(paths);
if (bundles == null) {
return;
}
if (event.getDragAction() == DnDConstants.ACTION_LINK) {
cursor = DragCursors.getGrabhandcursor();
}
event.startDrag(cursor, new TransferableParameterBundles(bundles));
}
use of java.awt.Cursor in project knime-core by knime.
the class AbstractPlotter2D method mouseExited.
/**
* {@inheritDoc}
*/
public void mouseExited(final MouseEvent e) {
if (m_crosshair) {
m_drawingPane.clearCursorCoord();
// set the cursor back
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
repaint();
}
}
Aggregations