841 842 // StackPane also has -fx-alignment. Replace it with 843 // ToolBarSkin's. 844 // TODO: Really should be able to reference StackPane.StyleableProperties.ALIGNMENT 845 final String alignmentProperty = ALIGNMENT.getProperty(); 846 for (int n=0, nMax=styleables.size(); n<nMax; n++) { 847 final CssMetaData<?,?> prop = styleables.get(n); 848 if (alignmentProperty.equals(prop.getProperty())) styleables.remove(prop); 849 } 850 851 styleables.add(SPACING); 852 styleables.add(ALIGNMENT); 853 STYLEABLES = Collections.unmodifiableList(styleables); 854 855 } 856 } 857 858 /** 859 * Returns the CssMetaData associated with this class, which may include the 860 * CssMetaData of its superclasses. 861 */ 862 public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() { 863 return StyleableProperties.STYLEABLES; 864 } 865 866 /** 867 * {@inheritDoc} 868 */ 869 @Override 870 public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() { 871 return getClassCssMetaData(); 872 } 873 874 @Override 875 protected Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) { 876 switch (attribute) { 877 case OVERFLOW_BUTTON: return overflowMenu; 878 default: return super.queryAccessibleAttribute(attribute, parameters); 879 } 880 } | 841 842 // StackPane also has -fx-alignment. Replace it with 843 // ToolBarSkin's. 844 // TODO: Really should be able to reference StackPane.StyleableProperties.ALIGNMENT 845 final String alignmentProperty = ALIGNMENT.getProperty(); 846 for (int n=0, nMax=styleables.size(); n<nMax; n++) { 847 final CssMetaData<?,?> prop = styleables.get(n); 848 if (alignmentProperty.equals(prop.getProperty())) styleables.remove(prop); 849 } 850 851 styleables.add(SPACING); 852 styleables.add(ALIGNMENT); 853 STYLEABLES = Collections.unmodifiableList(styleables); 854 855 } 856 } 857 858 /** 859 * Returns the CssMetaData associated with this class, which may include the 860 * CssMetaData of its superclasses. 861 * @return the CssMetaData associated with this class, which may include the 862 * CssMetaData of its superclasses 863 */ 864 public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() { 865 return StyleableProperties.STYLEABLES; 866 } 867 868 /** 869 * {@inheritDoc} 870 */ 871 @Override 872 public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() { 873 return getClassCssMetaData(); 874 } 875 876 @Override 877 protected Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) { 878 switch (attribute) { 879 case OVERFLOW_BUTTON: return overflowMenu; 880 default: return super.queryAccessibleAttribute(attribute, parameters); 881 } 882 } |