/** * Initialize the DefaultCellEditor with an editor component (like an text * field for instance). After calling this constructor, the * {@link EditorDelegate}, that links the CellEditor and the * editorComponent has to be passed to the delegate instance variable. * * @param editorComponent the component used * @param initializeButtons flag to indicate if the button texts and icons * should be initialized. */ protected SDefaultCellEditor(SComponent editorComponent, boolean initializeButtons) { this.messageLabel = new SLabel(); this.editorPanel = new EditorPanel(); this.ok = new SClickable(); this.cancel = new SClickable(); this.listenerList = new EventListenerList(); this.editorComponent = editorComponent; editorPanel.add(messageLabel); editorPanel.add(editorComponent); if (initializeButtons) { initButtons(); } }
/** * Creates a scrollbar with the specified orientation, * value, extent, mimimum, and maximum. * The "extent" is the size of the viewable area. It is also known * as the "visible amount". * * @throws IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL * @see #setOrientation * @see #setValue * @see #setVisibleAmount * @see #setMinimum * @see #setMaximum */ public SPageScroller(int orientation, int value, int extent, int min, int max) { super(new SPagingBoundedRangeModel(value, extent, min, max)); unitIncrement = extent; blockIncrement = extent; for (int i = 0; i < clickables.length; i++) { clickables[i] = new SClickable(); clickables[i].setEventTarget(this); } setOrientation(orientation); setMarginVisible(false); setHorizontalAlignment(SConstants.CENTER); setVerticalAlignment(SConstants.CENTER); setEpochCheckEnabled(false); }