Warning: session_start(): open(/var/lib/php/sessions/sess_02f7ccc78qaheok5nk5mi3n92e, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static JTextField onEnter(final JTextField tf, final O action) {
if (action == null || tf == null) ret tf;
tf.addActionListener(actionListener {
tf.selectAll();
callF(action);
});
ret tf;
}
static JButton onEnter(JButton btn, final O action) {
if (action == null || btn == null) ret btn;
btn.addActionListener(actionListener(action));
ret btn;
}
static JList onEnter(JList list, O action) {
list.addKeyListener(enterKeyListener(rCallOnSelectedListItem(list, action)));
ret list;
}
static JComboBox onEnter(final JComboBox cb, fO action) {
swing {
if (isEditable(cb)) {
JTextField text = (JTextField) cb.getEditor().getEditorComponent();
onEnter(text, action);
} else {
cb.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), "enter");
cb.getActionMap().put("enter", abstractAction("", r { cb.hidePopup(); callF(action); }));
}
}
ret cb;
}
static JTable onEnter(final JTable table, fO action) {
table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "Enter");
table.getActionMap().put("Enter", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
callF(action, table.getSelectedRow());
}
});
ret table;
}
/*static JTextArea onEnter(final JTextArea ta, fO action) {
addKeyListener(ta, enterKeyListener(action));
ret ta;
}*/