@Override
public void actionPerformed(ActionEvent e) {
validateStagename(stagenameF, geco, frame);
}
});
stagenameF.setInputVerifier(new InputVerifier() {
@Override
public boolean verify(JComponent input) {
return verifyStagename(stagenameF.getText());
}
@Override
public boolean shouldYieldFocus(JComponent input) {
return validateStagename(stagenameF, geco, frame);
}
});
add(stagenameF, c);
c.gridy = 1;
add(new JLabel(Messages.uiGet("StagePanel.ZeroHourLabel")), c); //$NON-NLS-1$
final SimpleDateFormat formatter = new SimpleDateFormat("H:mm"); //$NON-NLS-1$
formatter.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
final JTextField zerohourF = new JTextField(formatter.format(geco.stage().getZeroHour()));
zerohourF.setColumns(7);
zerohourF.setToolTipText(Messages.uiGet("StagePanel.ZeroHourTooltip")); //$NON-NLS-1$
add(zerohourF, c);
zerohourF.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateZeroHour(formatter, zerohourF, geco);
}
});
zerohourF.setInputVerifier(new InputVerifier() {
@Override
public boolean verify(JComponent input) {
try {
formatter.parse(zerohourF.getText());
return true;