You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ColumnState.java 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright 2000-2016 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.shared.ui.grid;
  17. import com.vaadin.shared.Connector;
  18. import com.vaadin.shared.ui.ContentMode;
  19. /**
  20. * Shared state for a Grid column.
  21. *
  22. * @author Vaadin Ltd
  23. * @since 8.0
  24. */
  25. public class ColumnState extends AbstractGridExtensionState {
  26. public String caption;
  27. public String internalId;
  28. public boolean sortable = false;
  29. public boolean editable = false;
  30. /** The assistive device caption for the column. */
  31. public String assistiveCaption;
  32. /** The caption for the column hiding toggle. */
  33. public String hidingToggleCaption;
  34. /** Whether this column is currently hidden. */
  35. public boolean hidden = false;
  36. /** Whether the column can be hidden by the user. */
  37. public boolean hidable = false;
  38. /**
  39. * Column width in pixels. Default column width is
  40. * {@value GridConstants#DEFAULT_COLUMN_WIDTH_PX}.
  41. */
  42. public double width = GridConstants.DEFAULT_COLUMN_WIDTH_PX;
  43. /** How much of the remaining space this column will reserve. */
  44. public int expandRatio = GridConstants.DEFAULT_EXPAND_RATIO;
  45. /**
  46. * The maximum expansion width of this column. -1 for "no maximum". If
  47. * maxWidth is less than the calculated width, maxWidth is ignored.
  48. */
  49. public double maxWidth = GridConstants.DEFAULT_MAX_WIDTH;
  50. /**
  51. * The minimum expansion width of this column. -1 for "no minimum". If
  52. * minWidth is less than the calculated width, minWidth will win.
  53. */
  54. public double minWidth = GridConstants.DEFAULT_MIN_WIDTH;
  55. /** Whether this column is resizable by the user. */
  56. public boolean resizable = true;
  57. public Connector renderer;
  58. /**
  59. * Whether the contents define the minimum width for this column.
  60. *
  61. * @since 8.1
  62. */
  63. public boolean minimumWidthFromContent = true;
  64. /**
  65. * The content mode for tooltips.
  66. *
  67. * @since 8.2
  68. */
  69. public ContentMode tooltipContentMode;
  70. }