/** * Returns a instance for the current default locale. * * @return the messages-bundle for the default locale. */ public static Messages getInstance() { return getInstance( Locale.getDefault() ); }
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 ); }
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" ) ); }
/** * Defines an <code>Action</code> object with a default description string and default icon. */ private CancelActionListener() { putValue( Action.NAME, Messages.getInstance().getString( "WaitDialog.CANCEL" ) ); }
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" ) ); }
/** * 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" ) ); }
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" ) ); }
public void actionPerformed( final ActionEvent e ) { final CancelEvent event = new CancelEvent( this ); for ( final CancelListener cancelListener : cancelListeners ) { try { if ( cancelListener != null ) { logger.debug( "Passing cancel action along to cancel listener [" + cancelListener + "]" ); cancelListener.cancelProcessing( event ); } } catch ( final Throwable ignored ) { logger.warn( Messages.getInstance().formatMessage( "WaitDialog.CANCEL_EXCEPTION", ignored.getLocalizedMessage() ) ); } } } }
/** * 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 ); }
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(); }
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 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; }
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(); }