एक इंटरफेस बनाएँ:
interface TableResources extends CellTable.Resources {
@Source({CellTable.Style.DEFAULT_CSS, "<your css file>.css"})
TableStyle cellTableStyle();
}
interface TableStyle extends CellTable.Style {
}
और प्रारंभ सेल तालिका:
CellTable.Resources resources = GWT.create(TableResources.class);
table = new CellTable<SomeProxy>(rowSize, resources);
cellview.client पैकेज आप डिफ़ॉल्ट gwt सीएसएस फ़ाइलें पा सकते हैं। यो उनको अपने शुरुआती बिंदु के रूप में उपयोग करें। "<your css file>.css"
में आपको विशिष्ट शैली में परिवर्तन डाल दिया गया है।
तुम भी colum शैली (col तत्व पर) सेट कर सकते हैं:
table.addColumnStyleName(colNumer, "some_css_style_name");
या बेहतर उपयोग सीएसएस संसाधन के बजाय नाम स्ट्रिंग "some_css_style_name"।
स्रोत
2010-11-16 13:56:24
मैं कैसे UiBinder के साथ एक साथ CellTable.Resources और CellTable प्रयोग करते हैं? मैं अपनी तालिका को (पंक्ति आकार, resouces) के साथ निर्मित करने के लिए नहीं मिल सकता है, मैं इसे UiField के साथ एनोटेट करता हूं और यह काम नहीं करता है। – rapadura
सेलटेबल के साथ '@UiField (प्रदत्त = सत्य) 'का उपयोग करें। इस तरह UiBinder जानता है कि आप कोड में तालिका बनाते हैं। –