當前位置: 首頁>>代碼示例>>Java>>正文


Java CssMetaData類代碼示例

本文整理匯總了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;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:17,代碼來源:JavaFXElement.java

示例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;
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:32,代碼來源:AllDayView.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesGridPaneTest.java

示例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)}));
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesAnchorPaneTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesFlowPaneTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesCubicCurveTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesTreeViewTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesFlowPaneTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesPolygonTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesCategoryAxisTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesTextFieldTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesRegionTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesTilePaneTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesHBoxTest.java

示例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);
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:10,代碼來源:StylesCategoryAxisTest.java


注:本文中的javafx.css.CssMetaData類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。