use of com.jsql.view.swing.text.action.DeleteNextCharAction in project jsql-injection by ron190.
the class UiUtil method initialize.
public static void initialize(JTextComponent component) {
component.setCaret(new DefaultCaret() {
@Override
public void setSelectionVisible(boolean visible) {
super.setSelectionVisible(true);
}
});
component.addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
component.setSelectionColor(UiUtil.COLOR_FOCUS_LOST);
component.revalidate();
component.repaint();
}
@Override
public void focusGained(FocusEvent e) {
component.setSelectionColor(UiUtil.COLOR_FOCUS_GAINED);
component.revalidate();
component.repaint();
}
});
component.getActionMap().put(DefaultEditorKit.deletePrevCharAction, new DeletePrevCharAction());
component.getActionMap().put(DefaultEditorKit.deleteNextCharAction, new DeleteNextCharAction());
}
Aggregations