public PropertyCellEditorWithEllipsis() { setLayout( new BorderLayout() ); this.eventListenerList = new EventListenerList(); ellipsisButton = new EllipsisButton( "..." ); ellipsisButton.addActionListener( new ExtendedEditorAction() ); textField = new JTextField(); textField.getInputMap().put ( Messages.getInstance().getKeyStroke( "PropertyCellEditorWithEllipsis.PopupEditor.Accelerator" ), POPUP_EDITOR ); textField.getActionMap().put( POPUP_EDITOR, new ExtendedEditorAction() ); textField.setBorder( BorderFactory.createEmptyBorder() ); add( textField, BorderLayout.CENTER ); add( ellipsisButton, BorderLayout.EAST ); nullable = false; }
public ArrayCellEditor() { setLayout( new BorderLayout() ); this.eventListenerList = new EventListenerList(); ellipsisButton = new EllipsisButton( "..." ); ellipsisButton.setDefaultCapable( false ); ellipsisButton.addActionListener( new ExtendedEditorAction() ); textField = new JTextField(); textField.setDocument( new NonFilteringPlainDocument() ); textField.getInputMap().put( Messages.getInstance().getKeyStroke ( "PropertyCellEditorWithEllipsis.PopupEditor.Accelerator" ), POPUP_EDITOR ); textField.getActionMap().put( POPUP_EDITOR, new ExtendedEditorAction() ); textField.setBorder( BorderFactory.createEmptyBorder() ); textField.setEditable( false ); add( textField, BorderLayout.CENTER ); add( ellipsisButton, BorderLayout.EAST ); nullable = false; }
/** * Constructs a new <code>DatePickerParameterComponent</code>. */ public DateCellEditor( final Class dateType ) { this.listeners = new EventListenerList(); this.dateType = dateType; if ( this.dateType.isArray() ) { this.dateType = this.dateType.getComponentType(); } setLayout( new BorderLayout() ); dateField = new JFormattedTextField(); dateField.setColumns( 20 ); dateField.setEditable( true ); pickDateButton = new EllipsisButton( new PickDateListener() ); add( dateField, BorderLayout.CENTER ); add( pickDateButton, BorderLayout.EAST ); }
public FormulaFragmentCellEditor() { setLayout( new BorderLayout() ); final Action action = createExtendedEditorAction(); this.eventListenerList = new EventListenerList(); ellipsisButton = new EllipsisButton( "..." ); ellipsisButton.addActionListener( action ); comboBox = new JComboBox(); final ComboBoxEditor boxEditor = comboBox.getEditor(); if ( boxEditor instanceof BasicComboBoxEditor ) { final BasicComboBoxEditor basicComboBoxEditor = (BasicComboBoxEditor) boxEditor; final Object editorComponent = basicComboBoxEditor.getEditorComponent(); if ( editorComponent instanceof JTextField ) { final JTextField editorTextField = (JTextField) editorComponent; editorTextField.setDocument( new NonFilteringPlainDocument() ); } } comboBox.setRenderer( new EmptyValueListCellRenderer() ); comboBox.addActionListener( new SelectionAction() ); comboBox.getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_ESCAPE, 0 ), new CancelAction() ); comboBox.getInputMap().put( EditorMessages.getInstance().getKeyStroke ( "AbstractStringValueCellEditor.Popup.Accelerator" ), POPUP_EDITOR ); comboBox.setBorder( BorderFactory.createEmptyBorder() ); comboBox.setEditable( true ); add( comboBox, BorderLayout.CENTER ); add( ellipsisButton, BorderLayout.EAST ); formulaContext = new DefaultFormulaContext(); nullable = false; }