TYPE - minkä tyyppisiä tietoja liitetään riveihinpublic class StringGrid<TYPE> extends TableView<StringGrid.GridRowItem<TYPE>>
columnResizePolicyProperty, comparatorProperty, editableProperty, editingCellProperty, fixedCellSizeProperty, focusModelProperty, itemsProperty, onScrollToColumnProperty, onScrollToProperty, onSortProperty, placeholderProperty, rowFactoryProperty, selectionModelProperty, sortPolicyProperty, tableMenuButtonVisiblePropertycontextMenuProperty, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthPropertyimpl_traversalEngineProperty, needsLayoutPropertyblendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty| Modifier and Type | Class and Description |
|---|---|
static class |
StringGrid.GridRowItem<TYPE>
Alkio yhdelle riville.
|
static interface |
StringGrid.OnGridCell<TYPE>
Rajapinta solun muokkaukselle
|
static interface |
StringGrid.OnGridLiveEdit<TYPE>
Rajapinta solun editoinnille
|
protected static class |
StringGrid.StringGridCell<TYPE>
Luokka yhdelle solulle
|
TableView.ResizeFeatures<S>, TableView.TableViewFocusModel<S>, TableView.TableViewSelectionModel<S>| Modifier and Type | Field and Description |
|---|---|
protected StringGrid.OnGridCell<TYPE> |
onCellString
Käsittelijä solun merkkijonolle
|
protected StringGrid.OnGridCell<TYPE> |
onCellValue
Käsittelijä lajitteluarvolle
|
protected StringGrid.OnGridCell<TYPE> |
onGridEdit
Käsittelijä muokkauksille
|
protected StringGrid.OnGridLiveEdit<TYPE> |
onGridLiveEdit
Käsittelijä reaaliaikaisille muokkauksille
|
CONSTRAINED_RESIZE_POLICY, DEFAULT_SORT_POLICY, UNCONSTRAINED_RESIZE_POLICYUSE_COMPUTED_SIZE, USE_PREF_SIZEBASELINE_OFFSET_SAME_AS_HEIGHT| Constructor and Description |
|---|
StringGrid()
Alustetaan taulukko
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Collection<TYPE> objs)
Lisätään uudet alkiot taulukkoon.
|
void |
add(String... items)
Lisätään uudet jonot taulukkoon
|
void |
add(TYPE... objs)
Lisätään uudet alkiot taulukkoon.
|
void |
add(TYPE obj)
Lisätään uusi alkio taulukkoon.
|
void |
add(TYPE obj,
String... items)
Lisätään uusi alkio taulukkoon
|
static void |
addStyleClasses(ObservableList<String> styles,
String newClasses)
Lisätään styles listaan jonosta luokat jotka erotettu pilkuilla tai välilyönneillä
|
void |
clear()
Poistaa kaikki rivit;
|
void |
disableColumnReOrder()
Estetään sarakkeiden järjestäminen.
|
protected int |
findRowNr(StringGrid.GridRowItem<TYPE> tableRow) |
String |
get(int row,
int col)
Palautetaan solun arvo
|
Pos |
getAlignment(int col)
Sarakkeen solujen sijoitus
|
int |
getColumnNr() |
String |
getEmptyStyleClass() |
TYPE |
getObject()
Palautetaan valittua riviä vastaava olio
|
TYPE |
getObject(int row)
Palautetaan riviä vastaava olio
|
StringGrid.OnGridCell<TYPE> |
getOnCellString() |
StringGrid.OnGridCell<TYPE> |
getOnCellValue() |
StringGrid.OnGridCell<TYPE> |
getOnGridEdit() |
StringGrid.OnGridLiveEdit<TYPE> |
getOnGridLiveEdit() |
String |
getRivit() |
StringProperty |
getRivitProperty() |
int |
getRowNr() |
String |
getStyleClass(int row,
int col)
Solun asetetut tyylit
|
void |
initialize()
Initializes the control.
|
void |
initTable(String... headings)
Lisätään taulukkoon otsikot-mukaisesti sarakkeet ja
|
void |
selectRow(int rowvisible)
Valitaan taulukosta tietty rivi.
|
void |
set(String s,
int row,
int col)
Asetetaan solun arvo
|
void |
setAlignment(int col,
int align)
Sarakkeen solujen sijoitus Swing-vakioiden avulla
|
void |
setAlignment(int col,
Pos align)
Sarakkeen solujen sijoitus
|
void |
setColumnSortOrderNumber(int col)
Asetetaan valitulle sarakkeelle numeerinen järjestely
|
void |
setColumnWidth(int col,
double width)
Asettaa sarakkeen leveyden
|
void |
setEmptyStyleClass(String emptyStyleClass) |
void |
setObject(TYPE obj,
int row)
Asetetaan solun arvo
|
void |
setOnCellString(StringGrid.OnGridCell<TYPE> onCellString) |
void |
setOnCellValue(StringGrid.OnGridCell<TYPE> onCellValue) |
void |
setOnGridEdit(StringGrid.OnGridCell<TYPE> onGridEdit) |
void |
setOnGridLiveEdit(StringGrid.OnGridLiveEdit<TYPE> onGridLiveEdit) |
void |
setRivit(String data)
Asetetaan taulukon sisältö.
|
void |
setSortable(int col,
boolean sortable)
Asettaa sarakkeet lajiteltavaksi
|
void |
setStyleClass(String s,
int row,
int col)
Asetetaan solun uusi tyyli
|
columnResizePolicyProperty, comparatorProperty, createDefaultSkin, edit, editableProperty, editingCellProperty, fixedCellSizeProperty, focusModelProperty, getClassCssMetaData, getColumnResizePolicy, getColumns, getComparator, getControlCssMetaData, getEditingCell, getFixedCellSize, getFocusModel, getItems, getOnScrollTo, getOnScrollToColumn, getOnSort, getPlaceholder, getRowFactory, getSelectionModel, getSortOrder, getSortPolicy, getVisibleLeafColumn, getVisibleLeafColumns, getVisibleLeafIndex, isEditable, isTableMenuButtonVisible, itemsProperty, onScrollToColumnProperty, onScrollToProperty, onSortProperty, placeholderProperty, resizeColumn, rowFactoryProperty, scrollTo, scrollTo, scrollToColumn, scrollToColumnIndex, selectionModelProperty, setColumnResizePolicy, setEditable, setFixedCellSize, setFocusModel, setItems, setOnScrollTo, setOnScrollToColumn, setOnSort, setPlaceholder, setRowFactory, setSelectionModel, setSortPolicy, setTableMenuButtonVisible, sort, sortPolicyProperty, tableMenuButtonVisiblePropertycomputeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getCssMetaData, getSkin, getTooltip, getUserAgentStylesheet, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthPropertygetChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaddEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_geomChanged, impl_getAccessible, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertyprotected StringGrid.OnGridCell<TYPE> onGridEdit
protected StringGrid.OnGridLiveEdit<TYPE> onGridLiveEdit
protected StringGrid.OnGridCell<TYPE> onCellValue
protected StringGrid.OnGridCell<TYPE> onCellString
public StringGrid()
public StringGrid.OnGridCell<TYPE> getOnCellValue()
public void setOnCellValue(StringGrid.OnGridCell<TYPE> onCellValue)
onCellValue - mitä kutsutaan kun halutaan näytettävä arvopublic StringGrid.OnGridCell<TYPE> getOnCellString()
public void setOnCellString(StringGrid.OnGridCell<TYPE> onCellString)
onCellString - mitä kutsutaan kun halutaan lajitteluarvopublic StringGrid.OnGridCell<TYPE> getOnGridEdit()
public void setOnGridEdit(StringGrid.OnGridCell<TYPE> onGridEdit)
onGridEdit - uusi käsittelijä muokkauksellepublic StringGrid.OnGridLiveEdit<TYPE> getOnGridLiveEdit()
public void setOnGridLiveEdit(StringGrid.OnGridLiveEdit<TYPE> onGridLiveEdit)
onGridLiveEdit - uusi käsittelijä muokkauksellepublic void initialize()
public void setRivit(String data)
data - monirivinen lista, jossa 1. rivi on otsikot ja muut dataa. Alkiot eroteltu |-merkillä.public void initTable(String... headings)
headings - sarakkaiden määrä ja otsikot tästäpublic void add(TYPE obj, String... items)
obj - mihin objektiin viitataanitems - lisättävät merkkijonotpublic void add(TYPE obj)
obj - mihin objektiin viitataanpublic void add(String... items)
items - lisättävät merkkijonotpublic void add(Collection<TYPE> objs)
objs - mitkä oliot lisätäänpublic void add(TYPE... objs)
objs - mitkä oliot lisätäänpublic void clear()
public void setSortable(int col, boolean sortable)
col - mikä sarake, -1 on kaikkisortable - lajiteltava vai eipublic void setColumnSortOrderNumber(int col)
col - mille sarakkeelle;public void setColumnWidth(int col, double width)
col - mikä sarake, -1 on kaikkiwidth - mikä on leveyspublic Pos getAlignment(int col)
col - mistä sarakkeestapublic void setAlignment(int col, Pos align)
col - minkä sarakkeen sijoitusalign - mihin keskitetään, esim. Pos.CENTER_CENTERpublic void setAlignment(int col, int align)
col - minkä sarakkeen sijoitusalign - mihin keskitetään, esim. SwingConstants.RIGHTpublic StringProperty getRivitProperty()
protected int findRowNr(StringGrid.GridRowItem<TYPE> tableRow)
tableRow - mitä riviä etsitäänpublic void selectRow(int rowvisible)
rowvisible - mikä rivi näkyvissä olevalla järjestykselläpublic int getRowNr()
public int getColumnNr()
public void set(String s, int row, int col)
s - uusi arvo solullerow - rivicol - sarakepublic String get(int row, int col)
row - miltä riviltä alkuperäisillä indekseilläcol - mistä sarakkeestapublic void setObject(TYPE obj, int row)
obj - mitä olioita rivi edustaarow - rivipublic TYPE getObject(int row)
row - miltä riviltä alkuperäisillä indekseilläpublic TYPE getObject()
public void setStyleClass(String s, int row, int col)
s - uusi tyylinimi solulle. Voi olla montakin pilkulla tai välilyönnille eroteltua nimeä.row - rivicol - sarakepublic String getStyleClass(int row, int col)
row - rivicol - sarakepublic static void addStyleClasses(ObservableList<String> styles, String newClasses)
styles - mihin listaan lisätäännewClasses - mitä tyylejä lisätäänpublic String getEmptyStyleClass()
public void setEmptyStyleClass(String emptyStyleClass)
emptyStyleClass - tyhjien solujen luokka (tai luokat eroteltuina pilkulla tai välilöynnillä)public void disableColumnReOrder()