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, 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, WebInnerNotification, WebLabel, WebLinkLabel, WebList, WebListCellRenderer, WebListCellRenderer.UIResource, WebListElement, WebMemoryBar, WebNotification, WebNumberRenderer, WebOverlay, WebPanel, WebPasswordField, WebPathField, WebPopup, WebPopupMenu, WebProgressBar, WebProgressOverlay, WebRadioButton, WebRootPaneUI.TitleLabel, WebScrollBar, WebScrollPane, WebSlider, WebSplitButton, WebStatusLabel, WebStepLabel, WebStepProgress, WebSwitch, WebSwitchGripper, WebSwitchPane, WebSyntaxPanel, WebTableCellRenderer, WebTableCellRenderer.UIResource, WebTableHeaderCellRenderer, WebTableHeaderCellRenderer.UIResource, WebTextField, WebTitledPanel, WebToggleButton, WebToolBar, WebToolBarCorner, WebTreeCellRenderer, WebTreeElement, WebTreeFilterField, 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 getMaximumHeight()
          Returns component maximum height.
 int getMaximumWidth()
          Returns component maximum width.
 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 setMaximumHeight(int maximumHeight)
          Sets component maximum height.
 C setMaximumWidth(int maximumWidth)
          Sets component maximum 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 setPreferredSize(int width, int height)
          Sets component preferred size.
 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

getMaximumWidth

int getMaximumWidth()
Returns component maximum width.

Returns:
component maximum width

setMaximumWidth

C setMaximumWidth(int maximumWidth)
Sets component maximum width. Pass -1 to let component choose maximum width on its own.

Parameters:
maximumWidth - new component maximum width
Returns:
modified component

getMaximumHeight

int getMaximumHeight()
Returns component maximum height.

Returns:
component maximum height

setMaximumHeight

C setMaximumHeight(int maximumHeight)
Sets component maximum height. Pass -1 to let component choose maximum height on its own.

Parameters:
maximumHeight - new component maximum height
Returns:
modified component

getPreferredSize

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

Returns:
component preferred size

setPreferredSize

C setPreferredSize(int width,
                   int height)
Sets component preferred size. This method is a simple bridge for JComponent#setPreferredSize method.

Parameters:
width - component preferred width
height - component preferred height
Returns:
modified component