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


Java Margin類代碼示例

本文整理匯總了Java中cz.vutbr.web.css.CSSProperty.Margin的典型用法代碼示例。如果您正苦於以下問題:Java Margin類的具體用法?Java Margin怎麽用?Java Margin使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Margin類屬於cz.vutbr.web.css.CSSProperty包,在下文中一共展示了Margin類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkDataCSS

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
private void checkDataCSS(StyleSheet ss) {
	Analyzer analyzer = new Analyzer(ss);

	StyleMap decl = analyzer.evaluateDOM(doc, "all", true);
	ElementMap elements = new ElementMap(doc);

	Element marginator = elements.getElementById("marginator");

	assertNotNull("Element marginator exists", marginator);

	NodeData data = decl.get(marginator);

	assertEquals(
			"<div id=\"marginator\"> contains margin with for same values",
			Margin.length, data.getProperty("margin-top"));
	assertEquals(
			"<div id=\"marginator\"> contains margin with for same values",
			Margin.length, data.getProperty("margin-bottom"));
	assertEquals("Margin of 100px", new Float(100.0f), data.getValue(
			TermLength.class, "margin-top").getValue());
	assertEquals("Margin of 100px", TermNumeric.Unit.px, data.getValue(
			TermLength.class, "margin-top").getUnit());
	assertEquals("for all for both values", data.getValue(TermLength.class,
			"margin-bottom"), data
			.getValue(TermLength.class, "margin-left"));
}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:27,代碼來源:ImportTest1.java

示例2: testRepeaterOnMargin

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@Test
public void testRepeaterOnMargin() {
	StyleMap decl = analyzer.evaluateDOM(doc, "all", false);

	Element marginator = elements.getElementById("marginator");

	assertNotNull("Element marginator exists", marginator);

	NodeData data = decl.get(marginator);

	assertEquals(
			"<div id=\"marginator\"> contains margin with for same values",
			Margin.length, data.getProperty("margin-top"));
	assertEquals(
			"<div id=\"marginator\"> contains margin with for same values",
			Margin.length, data.getProperty("margin-bottom"));
	assertEquals("Margin of 100px", new Float(100.0f), data.getValue(
			TermLength.class, "margin-top").getValue());
	assertEquals("Margin of 100px", TermNumeric.Unit.px, data.getValue(
			TermLength.class, "margin-top").getUnit());
	assertEquals("for all for both values", data.getValue(TermLength.class,
			"margin-bottom"), data
			.getValue(TermLength.class, "margin-left"));

}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:26,代碼來源:AnalyzerTest.java

示例3: MarginRepeater

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
public MarginRepeater() {
	super(4);
	this.type = Margin.class;
	names.add("margin-top");
	names.add("margin-right");
	names.add("margin-bottom");
	names.add("margin-left");

}
 
開發者ID:mantlik,項目名稱:swingbox-javahelp-viewer,代碼行數:10,代碼來源:DeclarationTransformer.java

示例4: operation

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@Override
protected boolean operation(int i, Map<String, CSSProperty> properties,
		Map<String, Term<?>> values) {

	return genericTermIdent(type, terms.get(i), AVOID_INH,
			names.get(i), properties)
			|| genericTermLength(terms.get(i),
					names.get(i), Margin.length, false, properties,
					values)
			|| genericTerm(TermPercent.class, terms.get(i), names
					.get(i), Margin.percentage, false, properties,
					values);
}
 
開發者ID:mantlik,項目名稱:swingbox-javahelp-viewer,代碼行數:14,代碼來源:DeclarationTransformer.java

示例5: operation

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@Override
protected boolean operation(int i, Map<String, CSSProperty> properties,
		Map<String, Term<?>> values) {

	return genericTermIdent(type, terms.get(i), AVOID_INH,
			names.get(i), properties)
			|| genericTermLength(terms.get(i),
					names.get(i), Margin.length, ValueRange.ALLOW_ALL, properties,
					values)
			|| genericTerm(TermPercent.class, terms.get(i), names
					.get(i), Margin.percentage, ValueRange.ALLOW_ALL, properties,
					values);
}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:14,代碼來源:DeclarationTransformerImpl.java

示例6: processMarginTop

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginTop(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, false, d, properties, values);
}
 
開發者ID:mantlik,項目名稱:swingbox-javahelp-viewer,代碼行數:7,代碼來源:DeclarationTransformer.java

示例7: processMarginRight

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginRight(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, false, d, properties, values);
}
 
開發者ID:mantlik,項目名稱:swingbox-javahelp-viewer,代碼行數:7,代碼來源:DeclarationTransformer.java

示例8: processMarginBottom

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginBottom(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, false, d, properties, values);
}
 
開發者ID:mantlik,項目名稱:swingbox-javahelp-viewer,代碼行數:7,代碼來源:DeclarationTransformer.java

示例9: processMarginLeft

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginLeft(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, false, d, properties, values);
}
 
開發者ID:mantlik,項目名稱:swingbox-javahelp-viewer,代碼行數:7,代碼來源:DeclarationTransformer.java

示例10: processMarginTop

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginTop(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, ValueRange.ALLOW_ALL, d, properties, values);
}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:7,代碼來源:DeclarationTransformerImpl.java

示例11: processMarginRight

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginRight(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, ValueRange.ALLOW_ALL, d, properties, values);
}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:7,代碼來源:DeclarationTransformerImpl.java

示例12: processMarginBottom

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginBottom(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, ValueRange.ALLOW_ALL, d, properties, values);
}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:7,代碼來源:DeclarationTransformerImpl.java

示例13: processMarginLeft

import cz.vutbr.web.css.CSSProperty.Margin; //導入依賴的package包/類
@SuppressWarnings("unused")
private boolean processMarginLeft(Declaration d,
		Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
	return genericOneIdentOrLengthOrPercent(Margin.class, Margin.length,
			Margin.percentage, ValueRange.ALLOW_ALL, d, properties, values);
}
 
開發者ID:radkovo,項目名稱:jStyleParser,代碼行數:7,代碼來源:DeclarationTransformerImpl.java


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