• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IconView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.swing.text.IconView的典型用法代码示例。如果您正苦于以下问题:Java IconView类的具体用法?Java IconView怎么用?Java IconView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IconView类属于javax.swing.text包,在下文中一共展示了IconView类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:ViewFactoryImpl.java


示例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);
}
 
开发者ID:xzel23,项目名称:meja,代码行数:22,代码来源:CellEditorPane.java


示例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);
}
 
开发者ID:Adrodoc55,项目名称:MPL,代码行数:20,代码来源:BnJaggedEditorKit.java


示例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);
}
 
开发者ID:chatty,项目名称:chatty,代码行数:19,代码来源:ExtendedTextPane.java


示例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);
}
 
开发者ID:arianne,项目名称:stendhal,代码行数:21,代码来源:KTextEdit.java


示例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);
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:21,代码来源:SamplePrintEditor.java


示例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);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:20,代码来源:WrapEditorKit.java


示例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);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:19,代码来源:NumberedViewFactory.java


示例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);
      }
 
开发者ID:K-scope,项目名称:K-scope,代码行数:24,代码来源:InformationDialog.java


示例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);
}
 
开发者ID:K-scope,项目名称:K-scope,代码行数:26,代码来源:SwingUtils.java


示例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);
}
 
开发者ID:K-scope,项目名称:K-scope,代码行数:24,代码来源:CodePane.java


示例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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:21,代码来源:MessageList.java


示例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);
}
 
开发者ID:lyrgard,项目名称:HexScape,代码行数:20,代码来源:WrapTextPane.java


示例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);
}
 
开发者ID:Xenoage,项目名称:Zong,代码行数:21,代码来源:ScaledEditorKit.java


示例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);
}
 
开发者ID:fsworld009,项目名称:JTChat,代码行数:20,代码来源:ChatroomPanel.java


示例16: createView

import javax.swing.text.IconView; //导入依赖的package包/类
protected View createView(Element em)
{
	String name = em.getName();
	if(AbstractDocument.ContentElementName.equals(name))
	{
		// deals with breaking long words
		return new XLabelView(em);
	}
	else if(AbstractDocument.ParagraphElementName.equals(name))
	{
		// deals with breaking long words
		return new XParagraphView(this, em);
	}
	else if(AbstractDocument.SectionElementName.equals(name))
	{
		return new XBoxView(em, View.Y_AXIS);
	}
	else if(StyleConstants.ComponentElementName.equals(name))
	{
		return new XComponentView(em);
	}
	else if(StyleConstants.IconElementName.equals(name))
	{
		return new IconView(em);
	}
	else
	{
		return new XLabelView(em);
	}
}
 
开发者ID:andy-goryachev,项目名称:PasswordSafe,代码行数:31,代码来源:CEditorKit.java


示例17: 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 new ParagraphView(elem);
		}
		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);
		}
	}
 
		return new LabelView(elem);
}
 
开发者ID:apache,项目名称:incubator-taverna-workbench,代码行数:31,代码来源:NoWrapEditorKit.java



注:本文中的javax.swing.text.IconView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VKRequest类代码示例发布时间:2022-05-21
下一篇:
Java NestableException类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap