本文整理汇总了Java中goryachev.common.util.CSet类的典型用法代码示例。如果您正苦于以下问题:Java CSet类的具体用法?Java CSet怎么用?Java CSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CSet类属于goryachev.common.util包,在下文中一共展示了CSet类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: htmlTags
import goryachev.common.util.CSet; //导入依赖的package包/类
private static synchronized CSet<String> htmlTags()
{
if(htmlTags == null)
{
htmlTags = new CSet<>(CKit.collectPublicStaticFields(HTML4.class, String.class));
}
return htmlTags;
}
示例2: htmlTags
import goryachev.common.util.CSet; //导入依赖的package包/类
private static synchronized CSet<String> htmlTags()
{
if(htmlTags == null)
{
htmlTags = CKit.collectPublicStaticFields(HTML4.class, String.class);
}
return htmlTags;
}
示例3: assignMenuBar
import goryachev.common.util.CSet; //导入依赖的package包/类
private static void assignMenuBar(JMenuBar mb)
{
CSet<Character> u = new CSet();
int ct = mb.getMenuCount();
for(int i=0; i<ct; i++)
{
JMenu m = mb.getMenu(i);
if(m != null)
{
assign(m, u);
}
}
}
示例4: assignMenu
import goryachev.common.util.CSet; //导入依赖的package包/类
private static void assignMenu(JMenu mb)
{
CSet<Character> u = new CSet();
int ct = mb.getMenuComponentCount();
for(int i=0; i<ct; i++)
{
Component m = mb.getMenuComponent(i);
if(m instanceof JMenuItem)
{
assign((JMenuItem)m, u);
}
}
}
示例5: assignPopupMenu
import goryachev.common.util.CSet; //导入依赖的package包/类
private static void assignPopupMenu(JPopupMenu mb)
{
CSet<Character> u = new CSet();
int ct = mb.getComponentCount();
for(int i=0; i<ct; i++)
{
Component m = mb.getComponent(i);
if(m instanceof JMenuItem)
{
assign((JMenuItem)m, u);
}
}
}
示例6: assignButtonPanel
import goryachev.common.util.CSet; //导入依赖的package包/类
private static void assignButtonPanel(Container p)
{
CSet<Character> u = new CSet();
int ct = p.getComponentCount();
for(int i=0; i<ct; i++)
{
Component m = p.getComponent(i);
if(m instanceof AbstractButton)
{
assignButton((AbstractButton)m, u);
}
}
}
示例7: assign
import goryachev.common.util.CSet; //导入依赖的package包/类
private static void assign(JMenuItem m, CSet<Character> u)
{
String text = m.getText();
int mnem = identifyMnemonic(text, u);
if(mnem >= 0)
{
m.setMnemonic(mnem);
}
}
示例8: assignButton
import goryachev.common.util.CSet; //导入依赖的package包/类
private static void assignButton(AbstractButton b, CSet<Character> u)
{
String text = b.getText();
int mnem = identifyMnemonic(text, u);
if(mnem >= 0)
{
b.setMnemonic(mnem);
}
}
示例9: identifyMnemonic
import goryachev.common.util.CSet; //导入依赖的package包/类
private static int identifyMnemonic(String text, CSet<Character> u)
{
if(text != null)
{
if(CKit.startsWithIgnoreCase(text, "<html>"))
{
// FIX problem: does not underline mnemonic char if html (bug in java)
text = stripHtmlTags(text);
}
for(int i=0; i<text.length(); i++)
{
char c = text.charAt(i);
if(Character.isLetterOrDigit(c))
{
char up = Character.toUpperCase(c);
if(!u.contains(up))
{
u.add(up);
return c;
}
}
}
}
return -1;
}