本文整理了Java中javax.swing.text.BoxView.<init>()
方法的一些代码示例,展示了BoxView.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BoxView.<init>()
方法的具体详情如下:
包路径:javax.swing.text.BoxView
类名称:BoxView
方法名:<init>
暂无
代码示例来源:origin: stackoverflow.com
var view = new BoxView({ctx: ctx, model: model});
view.render();
})
代码示例来源:origin: stackoverflow.com
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);
代码示例来源:origin: stackoverflow.com
canvas.click(function() {
var newview = new BoxView({
tagName: 'canvas', //Instead of el: canvas
model: model
});
$("#new").html(newview.render());
});
代码示例来源:origin: stackoverflow.com
Try this
class Main extents Activity
{
BoxView boxView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// if view is used using layout then
boxView = (BoxView)findViewByID(id);
//else if directly used
boxView = new BoxView(this);
box.setOnClickListener(new onClickListener()
{
@Override
public void onClick(View view) {
boxView.setCaption("X");
boxView.invalidate();
}
});
}
}
代码示例来源:origin: protegeproject/protege
@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 LogParagraphView(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);
}
}
代码示例来源:origin: RPTools/maptool
/**
* @see javax.swing.text.ViewFactory#create(javax.swing.text.Element)
*/
public View create(Element elem) {
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new TwoToneLabelView(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);
} // endif
} // endif
// default to text display
return new TwoToneLabelView(elem);
}
}
代码示例来源:origin: chatty/chatty
@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);
}
}
代码示例来源:origin: omegat-org/omegat
@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);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
@Override
public View create(Element elem) {
String kind = elem.getName();
View view = null;
if (kind == null) {
// default to text display
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ContentElementName)) {
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
view = new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
view = new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
view = new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
view = new IconView(elem);
}
return view;
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
public View create(Element elem) {
String kind = elem.getName();
View view = null;
if (kind == null) {
// default to text display
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ContentElementName)) {
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
view = new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
view = new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
view = new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
view = new IconView(elem);
}
return view;
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
@Override
public View create(Element elem) {
String kind = elem.getName();
View view = null;
if (kind == null) {
// default to text display
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ContentElementName)) {
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
view = new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
view = new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
view = new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
view = new IconView(elem);
}
return view;
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
@Override
public View create(Element elem) {
String kind = elem.getName();
View view = null;
if (kind == null) {
// default to text display
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ContentElementName)) {
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
view = new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
view = new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
view = new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
view = new IconView(elem);
}
return view;
}
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
@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 ParagraphView(elem);
return new NoLineWrapParagraphView(elem, codePane);
} 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);
}
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
@Override
public View create(Element elem) {
String kind = elem.getName();
View view = null;
if (kind == null) {
// default to text display
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ContentElementName)) {
view = new LabelView(elem);
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
view = new ParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
view = new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
view = new ComponentView(elem);
} else if (kind.equals(StyleConstants.IconElementName)) {
view = new IconView(elem);
}
return view;
}
}
代码示例来源:origin: blurpy/kouchat
/**
* This works the same as original view factory, except the
* use of a middle aligned icon view.
*
* {@inheritDoc}
*/
@Override
public View create(final Element elem) {
final String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
return new LabelView(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 MiddleAlignedIconView(elem); // Overridden icon view
}
}
// Default is text display
return new LabelView(elem);
}
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
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)) {
// if (isLineNumbersVisible()) {
return new NumberedParagraphView(elem, this);
// } else {
// 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);
}
}
代码示例来源:origin: jcoplien/trygve
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 ParagraphView(elem);
return new NumberedParagraphView(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);
}
}
代码示例来源:origin: stackoverflow.com
return new CustomTabParagraphView(elem);
} else if (kind.equals(AbstractDocument.SectionElementName)) {
return new BoxView(elem, View.Y_AXIS);
} else if (kind.equals(StyleConstants.ComponentElementName)) {
return new ComponentView(elem);
代码示例来源:origin: stackoverflow.com
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);
代码示例来源:origin: igniterealtime/Spark
public 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, 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 );
}
}
内容来源于网络,如有侵权,请联系作者删除!