C# 클래스 Habanero.Faces.Base.GridLayoutManager

Manages the layout of controls in a user interface by assigning them to positions in a grid with rows and columns
상속: LayoutManager
파일 보기 프로젝트 열기: Chillisoft/habanero.faces 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CalcColumnWidth int
CalcRowHeight int
GetFixedAmount int
GetFixedHeight int
GetFixedWidth int
GetNumVariableColumns int
GetNumVariableEntries int
GetNumVariableRows int
IsFixedColumn bool
IsFixedRow bool

공개 메소드들

메소드 설명
AddControl ( ControlInfo controlInfo ) : IControlHabanero

Adds a control as specified by the ControlInfo provided (which can provide some context for the control) such as number of rows or columns to span.

AddControl ( IControlHabanero control ) : IControlHabanero

Adds a control with a row and column span of 1 to the next position in the grid.

AddControl ( IControlHabanero control, int rowSpan, int columnSpan ) : IControlHabanero

Adds a control to the next position in the grid. The number of rows or columns to span are specified as parameters.

FixAllRowsBasedOnContents ( ) : void

Causes the fixed height of all the rows to be determined by the current or future contents

FixColumn ( int columnNumber, int columnWidth ) : void

Fixes the width of a column to a specified size

FixColumnBasedOnContents ( int columnNumber ) : void

Fixes a specified column's width based on current or future contents

FixRow ( int rowNumber, int rowHeight ) : void

Fixes the height of a row to a specified size

FixRowBasedOnContents ( int rowNumber ) : void

Fixes a specified row's height based on current or future contents

GetFixedColumnWidth ( int columnNumber ) : int

Gets the fixed width set for a specified column. The return value will be -1 if the width has not been fixed.

GetFixedHeightIncludingGaps ( ) : int

Returns the total height of the fixed-height rows added together, including the gaps and borders

GetFixedWidthIncludingGaps ( ) : int

Returns the total width of the fixed-width columns added together, including the gaps and borders

GridLayoutManager ( IControlHabanero managedControl, IControlFactory controlFactory ) : System

Constructor to initialise a new grid layout

SetGridSize ( int rows, int cols ) : void

Sets the grid size as a number of rows and columns

보호된 메소드들

메소드 설명
RefreshControlPositions ( ) : void

Updates the positions and settings of the controls in the interface

비공개 메소드들

메소드 설명
CalcColumnWidth ( ) : int

Calculates the average column width

CalcRowHeight ( ) : int

Calculates the average row height

GetFixedAmount ( int arr ) : int

Adds the values in the array provided, as long as the values are above -1. This method is used to add up fixed-height/width items.

GetFixedHeight ( ) : int

Returns the total height of the fixed-height rows added together

GetFixedWidth ( ) : int

Returns the total width of the fixed-width columns added together

GetNumVariableColumns ( ) : int

Counts the number of columns that have not been assigned a fixed width

GetNumVariableEntries ( int arr ) : int

Counts the number of items in the array provided that have a value of -1. This method is used to count the number of rows or columns that have not been assigned a fixed width/height

GetNumVariableRows ( ) : int

Counts the number of rows that have not been assigned a fixed height

IsFixedColumn ( int columnNumber ) : bool

Indicates whether the specified column has a fixed width

IsFixedRow ( int rowNumber ) : bool

Indicates whether the specified row has a fixed height

메소드 상세

AddControl() 공개 메소드

Adds a control as specified by the ControlInfo provided (which can provide some context for the control) such as number of rows or columns to span.
public AddControl ( ControlInfo controlInfo ) : IControlHabanero
controlInfo ControlInfo The information about the control to add to the next position in the grid.
리턴 IControlHabanero

AddControl() 공개 메소드

Adds a control with a row and column span of 1 to the next position in the grid.
public AddControl ( IControlHabanero control ) : IControlHabanero
control IControlHabanero The control to add
리턴 IControlHabanero

AddControl() 공개 메소드

Adds a control to the next position in the grid. The number of rows or columns to span are specified as parameters.
public AddControl ( IControlHabanero control, int rowSpan, int columnSpan ) : IControlHabanero
control IControlHabanero The control to add
rowSpan int The row span for the control
columnSpan int The column span for the control
리턴 IControlHabanero

FixAllRowsBasedOnContents() 공개 메소드

Causes the fixed height of all the rows to be determined by the current or future contents
public FixAllRowsBasedOnContents ( ) : void
리턴 void

FixColumn() 공개 메소드

Fixes the width of a column to a specified size
public FixColumn ( int columnNumber, int columnWidth ) : void
columnNumber int The column in question
columnWidth int The width to fix the column at
리턴 void

FixColumnBasedOnContents() 공개 메소드

Fixes a specified column's width based on current or future contents
public FixColumnBasedOnContents ( int columnNumber ) : void
columnNumber int The column in question
리턴 void

FixRow() 공개 메소드

Fixes the height of a row to a specified size
public FixRow ( int rowNumber, int rowHeight ) : void
rowNumber int The row in question
rowHeight int The height to fix the row at
리턴 void

FixRowBasedOnContents() 공개 메소드

Fixes a specified row's height based on current or future contents
public FixRowBasedOnContents ( int rowNumber ) : void
rowNumber int The row in question
리턴 void

GetFixedColumnWidth() 공개 메소드

Gets the fixed width set for a specified column. The return value will be -1 if the width has not been fixed.
public GetFixedColumnWidth ( int columnNumber ) : int
columnNumber int The column in question
리턴 int

GetFixedHeightIncludingGaps() 공개 메소드

Returns the total height of the fixed-height rows added together, including the gaps and borders
public GetFixedHeightIncludingGaps ( ) : int
리턴 int

GetFixedWidthIncludingGaps() 공개 메소드

Returns the total width of the fixed-width columns added together, including the gaps and borders
public GetFixedWidthIncludingGaps ( ) : int
리턴 int

GridLayoutManager() 공개 메소드

Constructor to initialise a new grid layout
public GridLayoutManager ( IControlHabanero managedControl, IControlFactory controlFactory ) : System
managedControl IControlHabanero The control to manage
controlFactory IControlFactory The control factory used to create any controls
리턴 System

RefreshControlPositions() 보호된 메소드

Updates the positions and settings of the controls in the interface
protected RefreshControlPositions ( ) : void
리턴 void

SetGridSize() 공개 메소드

Sets the grid size as a number of rows and columns
public SetGridSize ( int rows, int cols ) : void
rows int The number of rows
cols int The number of columns
리턴 void