public void addShiftAssignment(ShiftAssignment shiftAssignment) { Shift shift = shiftAssignment.getShift(); JPanel shiftPanel = shiftPanelMap.get(shift); JButton shiftAssignmentButton = SwingUtils.makeSmallButton(new JButton(new ShiftAssignmentAction(shiftAssignment))); shiftAssignmentButton.setEnabled(shiftPanel.isEnabled()); if (employee != null) { if (employee.getDayOffRequestMap().containsKey(shift.getShiftDate()) || employee.getShiftOffRequestMap().containsKey(shift)) { shiftAssignmentButton.setForeground(TangoColorFactory.SCARLET_1); } } Color color = nurseRosteringPanel.determinePlanningEntityColor(shiftAssignment, shift.getShiftType()); shiftAssignmentButton.setBackground(color); String toolTip = nurseRosteringPanel.determinePlanningEntityTooltip(shiftAssignment); shiftAssignmentButton.setToolTipText(toolTip); shiftPanel.add(shiftAssignmentButton); shiftPanel.repaint(); shiftAssignmentButtonMap.put(shiftAssignment, shiftAssignmentButton); }
shiftDateLabel.setEnabled(shiftDatePanel.isEnabled()); wrappingShiftDatePanel.add(shiftDateLabel, BorderLayout.NORTH); wrappingShiftDatePanel.add(shiftDatePanel, BorderLayout.CENTER); JPanel shiftDatePanel = shiftDatePanelMap.get(shift.getShiftDate()); JPanel shiftPanel = new JPanel(); shiftPanel.setEnabled(shiftDatePanel.isEnabled()); shiftPanel.setLayout(new BoxLayout(shiftPanel, BoxLayout.Y_AXIS)); Color backgroundColor = shiftDatePanel.getBackground();
/** * isEnabled, Returns true if this component is enabled, otherwise returns false. */ @Override public boolean isEnabled() { return super.isEnabled(); }
/** * isEnabled, Returns true if this component is enabled, otherwise returns false. */ @Override public boolean isEnabled() { return super.isEnabled(); }
/** * isEnabled, Returns true if this component is enabled, otherwise returns false. */ @Override public boolean isEnabled() { return super.isEnabled(); }
@Override public void mouseClicked(final MouseEvent e) { if (_sColorPanel.isEnabled()) { colorPanel_mouseClicked(e); } } });
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@ScriptFunction(jsDoc = ENABLED_JSDOC) @Override public boolean getEnabled() { return super.isEnabled(); }
@Override public void propertyChange(PropertyChangeEvent evt) { collocateProductSelector.getProductNameComboBox().setEnabled(panel.isEnabled()); collocateProductSelector.getProductFileChooserButton().setEnabled(panel.isEnabled()); final boolean collocate = getRadioButton().isSelected(); getCrsUI().firePropertyChange("collocate", !collocate, collocate); } });
@Override public void propertyChange(PropertyChangeEvent evt) { collocateProductSelector.getProductNameComboBox().setEnabled(panel.isEnabled()); collocateProductSelector.getProductFileChooserButton().setEnabled(panel.isEnabled()); final boolean collocate = getRadioButton().isSelected(); getCrsUI().firePropertyChange("collocate", !collocate, collocate); } });
@Override public void propertyChange(PropertyChangeEvent evt) { collocateProductSelector.getProductNameComboBox().setEnabled(panel.isEnabled()); collocateProductSelector.getProductFileChooserButton().setEnabled(panel.isEnabled()); final boolean collocate = getRadioButton().isSelected(); getCrsUI().firePropertyChange("collocate", !collocate, collocate); } });
public void addShiftAssignment(ShiftAssignment shiftAssignment) { Shift shift = shiftAssignment.getShift(); JPanel shiftPanel = shiftPanelMap.get(shift); JButton shiftAssignmentButton = SwingUtils.makeSmallButton(new JButton(new ShiftAssignmentAction(shiftAssignment))); shiftAssignmentButton.setEnabled(shiftPanel.isEnabled()); if (employee != null) { if (employee.getDayOffRequestMap().containsKey(shift.getShiftDate()) || employee.getShiftOffRequestMap().containsKey(shift)) { shiftAssignmentButton.setForeground(TangoColorFactory.SCARLET_1); } } Color color = nurseRosteringPanel.determinePlanningEntityColor(shiftAssignment, shift.getShiftType()); shiftAssignmentButton.setBackground(color); String toolTip = nurseRosteringPanel.determinePlanningEntityTooltip(shiftAssignment); shiftAssignmentButton.setToolTipText(toolTip); shiftPanel.add(shiftAssignmentButton); shiftPanel.repaint(); shiftAssignmentButtonMap.put(shiftAssignment, shiftAssignmentButton); }
shiftDateLabel.setEnabled(shiftDatePanel.isEnabled()); wrappingShiftDatePanel.add(shiftDateLabel, BorderLayout.NORTH); wrappingShiftDatePanel.add(shiftDatePanel, BorderLayout.CENTER); JPanel shiftDatePanel = shiftDatePanelMap.get(shift.getShiftDate()); JPanel shiftPanel = new JPanel(); shiftPanel.setEnabled(shiftDatePanel.isEnabled()); shiftPanel.setLayout(new BoxLayout(shiftPanel, BoxLayout.Y_AXIS)); Color backgroundColor = shiftDatePanel.getBackground();