本文整理匯總了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;
}