本文整理了Java中javax.swing.text.AttributeSet.getAttributeCount()
方法的一些代码示例,展示了AttributeSet.getAttributeCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeSet.getAttributeCount()
方法的具体详情如下:
包路径:javax.swing.text.AttributeSet
类名称:AttributeSet
方法名:getAttributeCount
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui
public boolean containsAttributes(AttributeSet attributes) {
int attrCount = attributes.getAttributeCount();
return (attrCount == 0)
|| (attrCount == 1)
&& (NAME.equals(attributes.getAttribute(NameAttribute)));
}
代码示例来源:origin: stackoverflow.com
XmlPullParser parser = getResources().getXml(R.xml.test);
try {
parser.next();
parser.nextTag();
} catch (Exception e) {
e.printStackTrace();
}
AttributeSet attr = Xml.asAttributeSet(parser);
int count = attr.getAttributeCount();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui
public boolean isEqual(AttributeSet attr) {
return (attr.getAttributeCount() == 1)
&& NAME.equals(attr.getAttribute(NameAttribute));
}
代码示例来源:origin: stackoverflow.com
public TimeDialogPreference(Context context, AttributeSet attrs) {
super(context, attrs);
for (int i=0;i<attrs.getAttributeCount();i++) {
String attr = attrs.getAttributeName(i);
String val = attrs.getAttributeValue(i);
if (attr.equalsIgnoreCase("step")) {
Log.i("TimeDialogPreference", "step = "+val);
}
}
}
代码示例来源:origin: stackoverflow.com
private int getTextAppearance(AttributeSet attrs, int defStyle) {
int answer = defStyle;
for(int i=0; i<attrs.getAttributeCount(); i++) {
if(attrs.getAttributeNameResource(i) == android.R.attr.textAppearance) {
String attrStringValue = attrs.getAttributeValue(i);
if(attrStringValue != null) {
attrStringValue = attrStringValue.replace("?", "");
answer = Integer.parseInt(attrStringValue);
}
}
}
return answer;
}
代码示例来源:origin: stackoverflow.com
public SeekBarPreference1(Context context, AttributeSet attrs) {
super(context, attrs);
_preferences = PreferenceManager.getDefaultSharedPreferences(context);
// Save your shared prefs here
// I saved the seekbar max && current value
// Something like below
for (int i = 0; i < attrs.getAttributeCount(); i++) {
if (attrs.getAttributeName(i).equals("max"))
_preferences.edit().putString(getKey() +"Max", ""+
attrs.getAttributeValue(i)).commit();
}
}
代码示例来源:origin: stackoverflow.com
super(context, attrs);
for (int i=0; i<attrs.getAttributeCount(); ++i) {
String attr = attrs.getAttributeName(i);
代码示例来源:origin: stackoverflow.com
public FoodButton(Context context, AttributeSet attrs) {
super(context, attrs);
for (int i=0;i<attrs.getAttributeCount();i++) {
switch (attrs.getAttributeName(i)) {
case "state_baked": mIsBaked = attrs.getAttributeBooleanValue(i, false); break;
case "state_fried": mIsFried = attrs.getAttributeBooleanValue(i, false); break;
}
}
}
代码示例来源:origin: stackoverflow.com
for (int i = 0; i < attrs.getAttributeCount(); i++)
代码示例来源:origin: stackoverflow.com
super(context, attrs);
for (int i=0; i<attrs.getAttributeCount(); ++i) {
String attr = attrs.getAttributeName(i);
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-mobility-svgcore
AttributeSet attribs = getDocumentElement().getAttributes();
if(attribs.getAttributeCount() > 0) {
String attribsText = getAttribsText();
if(SVGNavigatorTree.showAttributes) {
代码示例来源:origin: stackoverflow.com
public class MyTextView extends TextView {
Context context;
String ttfName;
public MyTextView(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
for (int i = 0; i < attrs.getAttributeCount(); i++) {
this.ttfName = attrs.getAttributeValue("http://schemas.android.com/apk/res/com.package.my", "ttf_name");
init();
}
}
private void init() {
Typeface font = Typeface.createFromAsset(context.getAssets(), ttfName);
setTypeface(font);
}
@Override
public void setTypeface(Typeface tf) {
super.setTypeface(tf);
}
代码示例来源:origin: stackoverflow.com
for (int i = 0; i < attrs.getAttributeCount(); i++) {
String attr = attrs.getAttributeName(i);
if ("name".equals(attr)) {
代码示例来源:origin: stackoverflow.com
for(int i = 0; i < attrs.getAttributeCount(); i ++ )
代码示例来源:origin: stackoverflow.com
System.out.println( "\n" + elem.getName() + " : " + as.getAttributeCount() );
代码示例来源:origin: stackoverflow.com
+ "', name: '" + element.getName()
+ "', children: " + element.getElementCount()
+ ", attributes: " + attrSet.getAttributeCount()
+ ", leaf: " + element.isLeaf());
Enumeration attrNames = attrSet.getAttributeNames();
代码示例来源:origin: pentaho/pentaho-reporting
final ArrayList<AttributeSet> muxList = new ArrayList<AttributeSet>();
if ( htmlAttr.getAttributeCount() != 0 ) {
muxList.add( htmlAttr );
代码示例来源:origin: stackoverflow.com
+ "', name: '" + element.getName()
+ "', children: " + element.getElementCount()
+ ", attributes: " + attrSet.getAttributeCount()
+ ", leaf: " + element.isLeaf());
Enumeration attrNames = attrSet.getAttributeNames();
内容来源于网络,如有侵权,请联系作者删除!