public ArrayTableModel() { editable = true; data = new ArrayList<Object>(); type = Object.class; columnTitle = Messages.getInstance().getString( "ArrayTableModel.Value" ); }
/** * The model's item index matches the AWT-font-style flags. * * @return */ private DefaultListModel createFontStyleModel() { final DefaultListModel model = new DefaultListModel(); model.addElement( Messages.getInstance().getString( "BasicFontPropertiesPane.FontStylePlain" ) ); model.addElement( Messages.getInstance().getString( "BasicFontPropertiesPane.FontStyleBold" ) ); model.addElement( Messages.getInstance().getString( "BasicFontPropertiesPane.FontStyleItalics" ) ); model.addElement( Messages.getInstance().getString( "BasicFontPropertiesPane.FontStyleBoldItalics" ) ); return model; }
private void init() { logger.debug( "Initializing the Wait Dialog" ); setModal( true ); setTitle( Messages.getInstance().getString( "WaitDialog.TITLE" ) ); message = new JLabel( Messages.getInstance().getString( "WaitDialog.MESSAGE" ) ); progressBar = new JProgressBar( 0, 1000 ); contentPane = new JPanel(); contentPane.setLayout( new BorderLayout( PADDING, PADDING ) ); setContentPane( contentPane ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private CancelActionListener() { putValue( Action.NAME, Messages.getInstance().getString( "WaitDialog.CANCEL" ) ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private SelectTodayAction() { putValue( Action.NAME, Messages.getInstance().getString( "DateChooserPanel.Today" ) ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private OKAction() { putValue( Action.NAME, Messages.getInstance().getString( "OK" ) ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private CancelAction() { putValue( Action.NAME, Messages.getInstance().getString( "CANCEL" ) ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private CloseAction() { putValue( Action.NAME, Messages.getInstance().getString( "PreviewDialog.Close" ) ); }
protected void init() { validationHandler = new ValidationHandler(); contentPane = new JPanel( new BorderLayout() ); setDefaultCloseOperation( DISPOSE_ON_CLOSE ); setTitle( Messages.getInstance().getString( "CustomPropertyEditorDialog.Title" ) ); setPreferredSize( new Dimension( 500, 550 ) ); super.init(); }
private void init() { setModal( true ); setTitle( Messages.getInstance().getString( "PreviewDialog.Title" ) ); final JPanel mainPanel = new JPanel( new BorderLayout() ); setContentPane( mainPanel ); table = new JTable(); mainPanel.add( new JScrollPane( table ), BorderLayout.CENTER ); final JPanel buttonsPanel = new JPanel( new FlowLayout( FlowLayout.RIGHT ) ); buttonsPanel.setBorder( BorderFactory.createMatteBorder( 1, 0, 0, 0, Color.LIGHT_GRAY ) ); final JButton closeButton = new JButton( new CloseAction() ); buttonsPanel.add( closeButton ); mainPanel.add( buttonsPanel, BorderLayout.SOUTH ); final JComponent contentPane = (JComponent) getContentPane(); final InputMap inputMap = contentPane.getInputMap(); final ActionMap actionMap = contentPane.getActionMap(); inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_ESCAPE, 0 ), "cancel" ); // NON-NLS actionMap.put( "cancel", new CloseAction() ); // NON-NLS setResizable( true ); setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); setSize( 800, 600 ); }
public BasicFontPropertiesPane() { eventListenerList = new EventListenerList(); final FontNameUpdateHandler nameUpdateHandler = new FontNameUpdateHandler(); fontFamilyTextBox = new JTextField(); fontFamilyTextBox.getDocument().addDocumentListener( nameUpdateHandler ); fontFamilyList = new JList( createFontNameModel() ); fontFamilyList.addListSelectionListener( nameUpdateHandler ); final FontSizeUpdateHandler sizeUpdateHandler = new FontSizeUpdateHandler(); fontSizeTextBox = new JTextField(); fontSizeTextBox.getDocument().addDocumentListener( sizeUpdateHandler ); fontSizeList = new JList( createFontSizeModel() ); fontSizeList.addListSelectionListener( sizeUpdateHandler ); fontStyleList = new JList( createFontStyleModel() ); fontStyleList.getSelectionModel().addListSelectionListener( new FontStyleUpdateHandler() ); extendedFontPropertiesShowing = true; underlineCheckbox = new JCheckBox( Messages.getInstance().getString( "BasicFontPropertiesPane.Underline" ) ); underlineCheckbox.addChangeListener( new FontStyleUpdateHandler() ); strikethroughCheckbox = new JCheckBox( Messages.getInstance().getString( "BasicFontPropertiesPane.Strikethrough" ) ); strikethroughCheckbox.addChangeListener( new FontStyleUpdateHandler() ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ public SortBulkUpAction( final BulkDataProvider tableModel, final ListSelectionModel listSelectionModel ) { if ( tableModel == null ) { throw new NullPointerException(); } if ( listSelectionModel == null ) { throw new NullPointerException(); } this.tableModel = tableModel; this.listSelectionModel = listSelectionModel; putValue( Action.SMALL_ICON, Messages.getInstance().getIcon( "Icons.MOVE_UP" ) ); putValue( Action.SHORT_DESCRIPTION, Messages.getInstance().getString( "Action.MOVE_UP" ) ); }
private RemoveEntryAction( final ArrayTableModel tableModel, final ListSelectionModel selectionModel ) { this.tableModel = tableModel; putValue( Action.SMALL_ICON, Messages.getInstance().getIcon( "Icons.Remove" ) ); putValue( Action.SHORT_DESCRIPTION, Messages.getInstance().getString( "ArrayCellEditorDialog.RemoveEntry.Description" ) ); this.selectionModel = selectionModel; this.selectionModel.addListSelectionListener( this ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ public SortBulkDownAction( final BulkDataProvider tableModel, final ListSelectionModel listSelectionModel ) { this.tableModel = tableModel; this.listSelectionModel = listSelectionModel; this.listSelectionModel.addListSelectionListener( this ); putValue( Action.SMALL_ICON, Messages.getInstance().getIcon( "Icons.MOVE_DOWN" ) ); putValue( Action.SHORT_DESCRIPTION, Messages.getInstance().getString( "Action.MOVE_DOWN" ) ); }
public void showData( final PreviewWorker previewWorker ) { // Run the query in a separate thread so that we can display a cancel dialog final Thread qt = new Thread( previewWorker ); BackgroundCancellableProcessHelper.executeProcessWithCancelDialog ( qt, previewWorker, this, Messages.getInstance().getString( "PreviewDialog.PreviewDataTask" ) ); // Get the results ... or throw the exception that was generated final TableModel rawTableModel = previewWorker.getResultTableModel(); if ( showData( rawTableModel ) ) { return; } previewWorker.close(); }
public RemoveBulkAction( final BulkDataProvider tableModel, final ListSelectionModel listSelectionModel ) { this.tableModel = tableModel; this.listSelectionModel = listSelectionModel; this.listSelectionModel.addListSelectionListener( new SelectionUpdateHandler() ); putValue( Action.SMALL_ICON, Messages.getInstance().getIcon( "Icons.REMOVE" ) ); putValue( Action.SHORT_DESCRIPTION, Messages.getInstance().getString( "Action.REMOVE" ) ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private AddSelectionAction( final ListSelectionModel selectionModel ) { this.selectionModel = selectionModel; putValue( Action.SMALL_ICON, Messages.getInstance().getIcon( "Icons.ForwardArrow" ) ); putValue( Action.SHORT_DESCRIPTION, Messages.getInstance().getString( "ArrayCellEditorDialog.AddRow" ) ); selectionModel.addListSelectionListener( this ); setEnabled( selectionModel.isSelectionEmpty() == false ); }
private AddEntryAction( final ArrayTableModel tableModel ) { this.tableModel = tableModel; putValue( Action.SMALL_ICON, Messages.getInstance().getIcon( "Icons.Add" ) ); putValue( Action.SHORT_DESCRIPTION, Messages.getInstance().getString( "ArrayCellEditorDialog.AddEntry.Description" ) ); }
protected void init() { setModal( true ); setTitle( Messages.getInstance().getString( "TextAreaPropertyEditorDialog.Title" ) ); textArea = createTextArea(); super.init(); }
protected void init() { setTitle( Messages.getInstance().getString( "ArrayCellEditorDialog.Title" ) ); tableModel = new ArrayTableModel(); table = new PropertyTable(); table.setModel( tableModel ); paletteListModel = new ArrayTableModel(); paletteListModel.setEditable( false ); paletteList = new PropertyTable(); paletteList.setModel( paletteListModel ); paletteList.setDragEnabled( true ); paletteList.setTransferHandler( new ListTransferHandler() ); paletteList.setDropMode( DropMode.ON ); paletteList.addMouseListener( new DoubleClickHandler( paletteList.getSelectionModel() ) ); contentPane = new JPanel(); contentPane.setLayout( new BorderLayout() ); super.init(); }