本文整理匯總了Java中javafx.css.CssMetaData類的典型用法代碼示例。如果您正苦於以下問題:Java CssMetaData類的具體用法?Java CssMetaData怎麽用?Java CssMetaData使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CssMetaData類屬於javafx.css包,在下文中一共展示了CssMetaData類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getCssValue
import javafx.css.CssMetaData; //導入依賴的package包/類
@Override public String getCssValue(String propertyName) {
List<CssMetaData<? extends Styleable, ?>> cssMetaData = node.getCssMetaData();
if (propertyName.equals("all")) {
return cssMetaData.toString();
}
for (CssMetaData<? extends Styleable, ?> cssMetaData2 : cssMetaData) {
if (cssMetaData2.getProperty().equals(propertyName)) {
Object initialValue = cssMetaData2.getInitialValue(null);
if (initialValue != null) {
return initialValue.toString();
}
return null;
}
}
return null;
}
示例2: extraPaddingProperty
import javafx.css.CssMetaData; //導入依賴的package包/類
/**
* Extra padding to be used inside of the view above and below the full day
* entries. This is required as the regular padding is already used for
* other styling purposes.
*
* @return insets for extra padding
*/
public final ObjectProperty<Insets> extraPaddingProperty() {
if (extraPadding == null) {
extraPadding = new StyleableObjectProperty<Insets>(new Insets(2, 0,
9, 0)) {
@Override
public CssMetaData<AllDayView, Insets> getCssMetaData() {
return StyleableProperties.EXTRA_PADDING;
}
@Override
public Object getBean() {
return AllDayView.this;
}
@Override
public String getName() {
return "extraPadding"; //$NON-NLS-1$
}
};
}
return extraPadding;
}
示例3: testfxrotate
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxrotate () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-rotate"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-rotate");
Assert.assertEquals(data.getInitialValue(getControl()), 0.0);
}
示例4: testfxbackgroundposition
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxbackgroundposition () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-background-position"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-background-position");
Assert.assertTrue(checkBackgroundPosition((BackgroundPosition[]) data.getInitialValue(getControl()), new BackgroundPosition[]{new BackgroundPosition(javafx.geometry.Side.LEFT,0.0,true,javafx.geometry.Side.TOP,0.0,true)}));
}
示例5: testfxtranslatey
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxtranslatey () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-translate-y"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-translate-y");
Assert.assertEquals(data.getInitialValue(getControl()), 0.0);
}
示例6: testfxscalex
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxscalex () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-scale-x"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-scale-x");
Assert.assertEquals(data.getInitialValue(getControl()), 1.0);
}
示例7: testfxscaley
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxscaley () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-scale-y"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-scale-y");
Assert.assertEquals(data.getInitialValue(getControl()), 1.0);
}
示例8: testfxborderimagesource
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxborderimagesource () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-border-image-source"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-border-image-source");
Assert.assertEquals(data.getInitialValue(getControl()), null);
}
示例9: testfxblendmode
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxblendmode () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-blend-mode"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-blend-mode");
Assert.assertEquals(data.getInitialValue(getControl()), null);
}
示例10: testfxtickmarkvisible
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxtickmarkvisible () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-tick-mark-visible"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-tick-mark-visible");
Assert.assertEquals(data.getInitialValue(getControl()), true);
}
示例11: testfxfontweight
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxfontweight () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-font-weight"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-font-weight");
Assert.assertEquals(data.getInitialValue(getControl()), javafx.scene.text.FontWeight.NORMAL);
}
示例12: testfxopacity
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxopacity () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-opacity"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-opacity");
Assert.assertEquals(data.getInitialValue(getControl()), 1.0);
}
示例13: testfxpreftileheight
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxpreftileheight () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-pref-tile-height"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-pref-tile-height");
Assert.assertEquals(data.getInitialValue(getControl()), -1.0);
}
示例14: testfxalignment
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxalignment () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-alignment"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-alignment");
Assert.assertEquals(data.getInitialValue(getControl()), javafx.geometry.Pos.TOP_LEFT);
}
示例15: testfxside
import javafx.css.CssMetaData; //導入依賴的package包/類
@Test
public void testfxside () {
Set<String> styleNames = getStyleNames();
Assert.assertNotNull(styleNames);
Assert.assertTrue(styleNames.contains("-fx-side"));
Map<String, CssMetaData> styles = getStyles();
CssMetaData data = styles.get("-fx-side");
Assert.assertEquals(data.getInitialValue(getControl()), null);
}