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.

ColorPicker.java 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright 2000-2018 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.v7.ui;
  17. import com.vaadin.v7.shared.ui.colorpicker.Color;
  18. /**
  19. * A class that defines default (button-like) implementation for a color picker
  20. * component.
  21. *
  22. * @since 7.0.0
  23. * @see ColorPickerArea
  24. * @author Vaadin Ltd
  25. *
  26. * @deprecated As of 8.0 replaced by {@link com.vaadin.ui.ColorPicker} based on
  27. * new data binding API
  28. */
  29. @Deprecated
  30. public class ColorPicker extends AbstractColorPicker {
  31. /**
  32. * Instantiates a new color picker.
  33. */
  34. public ColorPicker() {
  35. super();
  36. }
  37. /**
  38. * Instantiates a new color picker.
  39. *
  40. * @param popupCaption
  41. * caption of the color select popup
  42. */
  43. public ColorPicker(String popupCaption) {
  44. super(popupCaption);
  45. }
  46. /**
  47. * Instantiates a new color picker.
  48. *
  49. * @param popupCaption
  50. * caption of the color select popup
  51. * @param initialColor
  52. * the initial color
  53. */
  54. public ColorPicker(String popupCaption, Color initialColor) {
  55. super(popupCaption, initialColor);
  56. setDefaultCaptionEnabled(true);
  57. }
  58. @Override
  59. protected void setDefaultStyles() {
  60. setPrimaryStyleName(STYLENAME_BUTTON);
  61. addStyleName(STYLENAME_DEFAULT);
  62. }
  63. }