本文整理汇总了Java中javax.swing.text.IconView类的典型用法代码示例。如果您正苦于以下问题:Java IconView类的具体用法?Java IconView怎么用?Java IconView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IconView类属于javax.swing.text包,在下文中一共展示了IconView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import javax.swing.text.IconView; //导入依赖的package包/类
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return null;
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new DocumentView(elem);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
return null;
}
示例2: create
import javax.swing.text.IconView; //导入依赖的package包/类
@Override
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
switch (kind) {
case AbstractDocument.ContentElementName:
return new LabelView(elem);
case AbstractDocument.ParagraphElementName:
return new ParagraphView(elem);
case AbstractDocument.SectionElementName:
return new AlignedBoxView(elem, View.Y_AXIS);
case StyleConstants.ComponentElementName:
return new ComponentView(elem);
case StyleConstants.IconElementName:
return new IconView(elem);
default:
}
}
return new LabelView(elem);
}
示例3: create
import javax.swing.text.IconView; //导入依赖的package包/类
@Override
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return createLabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
// return new MyParagraphView(elem);
return new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
} // default to text display
return new LabelView(elem);
}
示例4: create
import javax.swing.text.IconView; //导入依赖的package包/类
@Override
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new WrapLabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
return new LabelView(elem);
}
示例5: create
import javax.swing.text.IconView; //导入依赖的package包/类
@Override
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new WrapLabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
// default to text display
return new LabelView(elem);
}
示例6: create
import javax.swing.text.IconView; //导入依赖的package包/类
public View create(Element elem) {
String kind = elem.getName();
if (kind != null)
if (kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
// We changed this so we can mess with tab stops
return new SPParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
// we changed this so we can zoom in on text
//return new ScaledBoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
// default to text display
return new LabelView(elem);
}
示例7: create
import javax.swing.text.IconView; //导入依赖的package包/类
public View create( Element elem ) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new WrapLabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
// default to text display
return new LabelView(elem);
}
示例8: create
import javax.swing.text.IconView; //导入依赖的package包/类
public View create(Element elem) {
String kind = elem.getName();
// System.out.println("Kind: " + kind);
if (kind != null)
if (kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new NumberedParagraphView(elem, highlight);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new NoWrapBoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
// default to text display
return new LabelView(elem);
}
示例9: create
import javax.swing.text.IconView; //导入依赖的package包/类
/**
* 要素に基づいてビューを作成します。
* @param elem 作成対象要素
* @return ビュー
*/
@Override
public View create(Element elem) {
String kind = elem.getName();
if(kind != null) {
if(kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(elem);
}else if(kind.equals(AbstractDocument.ParagraphElementName)) {
return new NoWrapParagraphView(elem);
}else if(kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
}else if(kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
}else if(kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
return new LabelView(elem);
}
示例10: create
import javax.swing.text.IconView; //导入依赖的package包/类
/**
* 要素に基づいてビューを作成します。
*
* @param elem
* 作成対象要素
* @return ビュー
*/
@Override
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new NoWrapParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
return new LabelView(elem);
}
示例11: create
import javax.swing.text.IconView; //导入依赖的package包/类
/**
* 要素に基づいてビューを作成します。
* @param elem 作成対象要素
* @return ビュー
*/
@Override
public View create(Element elem) {
String kind = elem.getName();
if(kind != null) {
if(kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(elem);
}else if(kind.equals(AbstractDocument.ParagraphElementName)) {
return new WordWrapParagraphView(elem);
}else if(kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
}else if(kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
}else if(kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
return new LabelView(elem);
}
示例12: create
import javax.swing.text.IconView; //导入依赖的package包/类
@Override
public javax.swing.text.View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
switch (kind) {
case AbstractDocument.ContentElementName:
return new WrapLabelView(elem);
case AbstractDocument.ParagraphElementName:
return new ParagraphView(elem);
case AbstractDocument.SectionElementName:
return new BoxView(elem, javax.swing.text.View.Y_AXIS);
case StyleConstants.ComponentElementName:
return new ComponentView(elem);
case StyleConstants.IconElementName:
return new IconView(elem);
}
}
// default to text display
return new LabelView(elem);
}
示例13: create
import javax.swing.text.IconView; //导入依赖的package包/类
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new WrapLabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
// default to text display
return new LabelView(elem);
}
示例14: create
import javax.swing.text.IconView; //导入依赖的package包/类
@Override public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
switch (kind) {
case AbstractDocument.ContentElementName:
return new LabelView(elem);
case AbstractDocument.ParagraphElementName:
return new ParagraphView(elem);
case AbstractDocument.SectionElementName:
return new ScaledView(elem, View.Y_AXIS);
case StyleConstants.ComponentElementName:
return new ComponentView(elem);
case StyleConstants.IconElementName:
return new IconView(elem);
}
}
// default to text display
return new LabelView(elem);
}
示例15: create
import javax.swing.text.IconView; //导入依赖的package包/类
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new ChatroomPanel.WrapLabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
return new IconView(elem);
}
}
// default to text display
return new LabelView(elem);
}