本文整理了Java中javax.swing.JTabbedPane.getFont()
方法的一些代码示例,展示了JTabbedPane.getFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.getFont()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:getFont
暂无
代码示例来源:origin: com.jtattoo/JTattoo
protected Font getTabFont(boolean isSelected) {
return tabPane.getFont();
}
代码示例来源:origin: net.sf.ingenias/editor
protected void installDefaults()
{
super.installDefaults();
tabAreaInsets.left = 4;
selectedTabPadInsets = new Insets(0, 0, 0, 0);
tabInsets = selectedTabPadInsets;
Color background = tabPane.getBackground();
fillColor = background.darker();
boldFont = tabPane.getFont().deriveFont(Font.BOLD);
boldFontMetrics = tabPane.getFontMetrics(boldFont);
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = FONT_JSDOC)
@Override
public Font getFont() {
return super.getFont();
}
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
private static int getAquaTabbedPaneBaseline(JTabbedPane tp, int height) {
Font font = tp.getFont();
FontMetrics metrics = tp.getFontMetrics(font);
int ascent = metrics.getAscent();
case JTabbedPane.TOP:
offset = 5;
if (tp.getFont().getSize() > 12) {
offset = 6;
return offset + yOffset + ascent - 1;
case JTabbedPane.BOTTOM:
if (tp.getFont().getSize() > 12) {
offset = 6;
} else {
代码示例来源:origin: com.jtattoo/JTattoo
protected FontMetrics getFontMetrics() {
Font font = tabPane.getFont().deriveFont(Font.BOLD);
return JTattooUtilities.getFontMetrics(tabPane, null, font);
}
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
private int getMaxTabHeight(JTabbedPane tp) {
int fontHeight = tp.getFontMetrics(tp.getFont()).getHeight();
int height = fontHeight;
boolean tallerIcons = false;
for (int counter = tp.getTabCount() - 1; counter >= 0; counter--) {
Icon icon = tp.getIconAt(counter);
if (icon != null) {
int iconHeight = icon.getIconHeight();
height = Math.max(height, iconHeight);
if (iconHeight > fontHeight) {
tallerIcons = true;
}
}
}
Insets tabInsets = UIManager.getInsets("TabbedPane.tabInsets");
height += 2;
/*
if (!isMetal() || !tallerIcons) {
height += tabInsets.top + tabInsets.bottom;
}*/
return height;
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
protected void installDefaults() {
super.installDefaults();
tabAreaInsets.left = 0;
selectedTabPadInsets = new Insets(0, 0, 0, 0);
tabInsets = selectedTabPadInsets;
tabPane.setFont(tabPane.getFont().deriveFont(Font.PLAIN, 10.0f));
}
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
private static int getMaxTabHeight(JTabbedPane tp) {
int fontHeight = tp.getFontMetrics(tp.getFont()).getHeight();
int height = fontHeight;
boolean tallerIcons = false;
for (int counter = tp.getTabCount() - 1; counter >= 0; counter--) {
Icon icon = tp.getIconAt(counter);
if (icon != null) {
int iconHeight = icon.getIconHeight();
height = Math.max(height, iconHeight);
if (iconHeight > fontHeight) {
tallerIcons = true;
}
}
}
Insets tabInsets = UIManager.getInsets("TabbedPane.tabInsets");
height += 2;
if (!isMetal() || !tallerIcons) {
height += tabInsets.top + tabInsets.bottom;
}
return height;
}
代码示例来源:origin: org.protege/protege-editor-core-application
protected void installDefaults() {
super.installDefaults();
tabAreaInsets.left = 0;
selectedTabPadInsets = new Insets(0, 0, 0, 0);
tabInsets = selectedTabPadInsets;
tabPane.setFont(tabPane.getFont().deriveFont(Font.PLAIN, 10.0f));
}
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
"TabbedPane.tabAreaInsets"),
tp.getTabPlacement());
FontMetrics metrics = tp.getFontMetrics(tp.getFont());
int maxHeight = getMaxTabHeight(tp);
iconRect.setBounds(0, 0, 0, 0);
代码示例来源:origin: cytoscape.coreplugins/cpath2
/**
* Constructor.
*
* @param interactionBundleModel InteractionBundleModel Object.
* @param pathwayTableModel PathwayTableModel Object.
*/
public SearchDetailsPanel(InteractionBundleModel interactionBundleModel,
PathwayTableModel pathwayTableModel) {
this.interactionBundleModel = interactionBundleModel;
GradientHeader header = new GradientHeader("Step 3: Select Network(s)");
setLayout(new BorderLayout());
this.add(header, BorderLayout.NORTH);
JTabbedPane tabbedPane = new JTabbedPane();
JPanel interactionPanel = new InteractionBundlePanel(interactionBundleModel);
JPanel pathwayPane = createPathwayPane(pathwayTableModel);
Font font = tabbedPane.getFont();
Font newFont = new Font (font.getFamily(), Font.PLAIN, font.getSize()-2);
tabbedPane.setFont(newFont);
tabbedPane.add("Pathways", pathwayPane);
tabbedPane.add("Interaction Networks", interactionPanel);
add(tabbedPane, BorderLayout.CENTER);
}
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
"TabbedPane.tabAreaInsets"),
tp.getTabPlacement());
FontMetrics metrics = tp.getFontMetrics(tp.getFont());
int maxHeight = getMaxTabHeight(tp);
iconRect.setBounds(0, 0, 0, 0);
代码示例来源:origin: org.cytoscape/cpath2-impl
/**
* Constructor.
*
* @param interactionBundleModel InteractionBundleModel Object.
* @param pathwayTableModel PathwayTableModel Object.
* @param application
* @param taskManager
*/
public SearchDetailsPanel(InteractionBundleModel interactionBundleModel,
PathwayTableModel pathwayTableModel, CPathFactory factory) {
this.factory = factory;
GradientHeader header = new GradientHeader("Step 3: Select Network(s)");
setLayout(new BorderLayout());
this.add(header, BorderLayout.NORTH);
JTabbedPane tabbedPane = new JTabbedPane();
JPanel interactionPanel = factory.createInteractionBundlePanel(interactionBundleModel);
JPanel pathwayPane = createPathwayPane(pathwayTableModel);
Font font = tabbedPane.getFont();
Font newFont = new Font (font.getFamily(), Font.PLAIN, font.getSize()-2);
tabbedPane.setFont(newFont);
tabbedPane.add("Pathways", pathwayPane);
tabbedPane.add("Interaction Networks", interactionPanel);
add(tabbedPane, BorderLayout.CENTER);
}
代码示例来源:origin: org.protege/protege-editor-owl
private void createUI() {
setLayout(new BorderLayout(7, 7));
classHierarchySplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
classHierarchySplitPane.setBorder(null);
classHierarchySplitPane.setResizeWeight(0.8);
tabbedPane = new JTabbedPane();
tabbedPane.setFont(tabbedPane.getFont().deriveFont(Font.PLAIN, 11.0f));
add(classHierarchySplitPane, BorderLayout.CENTER);
classHierarchySplitPane.setBottomComponent(tabbedPane);
// createButtonPanel();
createClassTree();
createObjectPropertyTree();
createDataPropertyTree();
createIndividualsList();
tabbedPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
handleTabSelectionChange();
}
});
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
private void createUI() {
setLayout(new BorderLayout(7, 7));
classHierarchySplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
classHierarchySplitPane.setBorder(null);
classHierarchySplitPane.setResizeWeight(0.8);
tabbedPane = new JTabbedPane();
tabbedPane.setFont(tabbedPane.getFont().deriveFont(Font.PLAIN, 11.0f));
add(classHierarchySplitPane, BorderLayout.CENTER);
classHierarchySplitPane.setBottomComponent(tabbedPane);
// createButtonPanel();
createClassTree();
createObjectPropertyTree();
createDataPropertyTree();
createIndividualsList();
tabbedPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
handleTabSelectionChange();
}
});
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
Font font=UIManager.getFont("TabbedPane.selectedFont");
if(!isSelected || font==null)
font= tabPane.getFont();
代码示例来源:origin: com.samskivert/samskivert
Font font = editor.getFont();
Font smaller = font.deriveFont(font.getSize()-1f);
代码示例来源:origin: BTCPrivate/bitcoin-private-full-node-wallet
Font oldTabFont = tabs.getFont();
Font newTabFont = new Font(oldTabFont.getName(), Font.BOLD, oldTabFont.getSize() * 57 / 50);
tabs.setFont(newTabFont);
代码示例来源:origin: ZencashOfficial/zencash-swing-wallet-ui
Font oldTabFont = tabs.getFont();
Font newTabFont = new Font(oldTabFont.getName(), Font.BOLD | Font.ITALIC, oldTabFont.getSize() * 57 / 50);
tabs.setFont(newTabFont);
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
Font font = isSelected ? PaletteLookAndFeel.getInstance().getFont("TabbedPane.selectedFont") : tabPane.getFont();
FontMetrics metrics = PaletteUtilities.getFontMetrics(tabPane, g, font);
Icon icon = getIconForTab(tabIndex);
内容来源于网络,如有侵权,请联系作者删除!