com.alee.utils.swing
Interface SizeMethods<C extends java.awt.Component>

Type Parameters:
C - component type
All Superinterfaces:
SwingMethods
All Known Implementing Classes:
AlignPanel, BorderPanel, CenterPanel, ComponentTransition, DictionariesTreeRenderer, DoubleColorField, EmptyPanel, FlowPanel, GenericCellEditor, GridPanel, GroupPanel, HotkeyTipLabel, IconProgress, LanguageEditor, LanguageExample.MyLabel, LineColorChooser, MultiComponentTransition, NinePatchEditor, NinePatchEditorPanel, PaletteColorChooser, PopupLayer, ResizablePanel, SampleTreeCellRenderer, ShadeLayer, SingleAlignPanel, SourceViewer, TwoSidesPanel, VerticalPanel, WebAccordion, WebAsyncTreeCellRenderer, WebAsyncTreeFilterField, WebBooleanRenderer, WebBreadcrumb, WebBreadcrumbButton, WebBreadcrumbLabel, WebBreadcrumbPanel, WebBreadcrumbToggleButton, WebButton, WebButtonGroup, WebButtonPopup, WebCalendar, WebCheckBox, WebCheckBoxList, WebCheckBoxListElement, WebCheckBoxTreeCellRenderer, WebClock, WebCollapsiblePane, WebColorChooserField, WebColorChooserPanel, WebComboBox, WebComboBoxElement, WebComponentPanel, WebComponentPanel.WebSelectablePanel, WebCursorTracker, WebDateField, WebDateRenderer, WebDirectoryChooserPanel, WebDockableFrame, WebDockablePane, WebDocumentPane, WebDoubleRenderer, WebDynamicMenu, WebFileBreadcrumb, WebFileChooserField, WebFileChooserField.FilePlate, WebFileChooserPanel, WebFileDrop, WebFileList, WebFileListCellRenderer, WebFilePlate, WebFileTableCellRenderer, WebFileTreeCellRenderer, WebFormattedTextField, WebGlassPane, WebGradientColorChooser, WebHeavyWeightPopup, WebHotkeyField, WebHotkeyLabel, WebIconRenderer, WebLabel, WebLinkLabel, WebList, WebListCellRenderer, WebListCellRenderer.UIResource, WebListElement, WebMemoryBar, WebNotificationPopup, WebNumberRenderer, WebOverlay, WebPanel, WebPasswordField, WebPathField, WebPopup, WebPopupMenu, WebProgressBar, WebProgressOverlay, WebRadioButton, WebRootPaneUI.TitleLabel, WebScrollBar, WebScrollPane, WebSlider, WebSplitButton, WebStatusLabel, WebStepLabel, WebStepProgress, WebSwitch, WebSwitchGripper, WebSwitchPane, WebTableCellRenderer, WebTableCellRenderer.UIResource, WebTableHeaderCellRenderer, WebTableHeaderCellRenderer.UIResource, WebTextField, WebTitledPanel, WebToggleButton, WebToolBar, WebToolBarCorner, WebTreeCellRenderer, WebTreeElement, WebTristateCheckBox, WebVerticalLabel, WrapPanel

public interface SizeMethods<C extends java.awt.Component>
extends SwingMethods

This interface provides a set of methods that should be added into components that support custom size methods.

Author:
Mikle Garin
See Also:
SwingMethods, SizeUtils

Method Summary
 int getMinimumHeight()
          Returns component minimum height.
 int getMinimumWidth()
          Returns component minimum width.
 int getPreferredHeight()
          Returns component preferred height.
 java.awt.Dimension getPreferredSize()
          Returns component preferred size.
 int getPreferredWidth()
          Returns component preferred width.
 C setMinimumHeight(int minimumHeight)
          Sets component minimum height.
 C setMinimumWidth(int minimumWidth)
          Sets component minimum width.
 C setPreferredHeight(int preferredHeight)
          Sets component preferred height.
 C setPreferredWidth(int preferredWidth)
          Sets component preferred width.
 

Method Detail

getPreferredWidth

int getPreferredWidth()
Returns component preferred width.

Returns:
component preferred width

setPreferredWidth

C setPreferredWidth(int preferredWidth)
Sets component preferred width. Pass -1 to let component choose preferred width on its own.

Parameters:
preferredWidth - new component preferred width
Returns:
modified component

getPreferredHeight

int getPreferredHeight()
Returns component preferred height.

Returns:
component preferred height

setPreferredHeight

C setPreferredHeight(int preferredHeight)
Sets component preferred height. Pass -1 to let component choose preferred height on its own.

Parameters:
preferredHeight - new component preferred height
Returns:
modified component

getMinimumWidth

int getMinimumWidth()
Returns component minimum width.

Returns:
component minimum width

setMinimumWidth

C setMinimumWidth(int minimumWidth)
Sets component minimum width. Pass -1 to let component choose minimum width on its own.

Parameters:
minimumWidth - new component minimum width
Returns:
modified component

getMinimumHeight

int getMinimumHeight()
Returns component minimum height.

Returns:
component minimum height

setMinimumHeight

C setMinimumHeight(int minimumHeight)
Sets component minimum height. Pass -1 to let component choose minimum height on its own.

Parameters:
minimumHeight - new component minimum height
Returns:
modified component

getPreferredSize

java.awt.Dimension getPreferredSize()
Returns component preferred size.

Returns:
component preferred size