本文整理了Java中javax.swing.JTabbedPane.setFont()
方法的一些代码示例,展示了JTabbedPane.setFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.setFont()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:setFont
暂无
代码示例来源:origin: 4thline/cling
@PostConstruct
public void init() {
addWindowListener(
new WindowAdapter() {
@Override
public void windowClosing(WindowEvent windowEvent) {
dispose();
presenter.onViewDisposed();
}
}
);
tabs.setFont(new Font(Font.DIALOG, Font.PLAIN, 20));
for (int i = 0; i < SUPPORTED_INSTANCES; i++) {
InstanceView transportView = avTransportViewInstance.get();
transportView.init(i);
transportViews.put(i, transportView);
tabs.addTab(Integer.toString(i), transportView.asUIComponent());
}
getContentPane().add(tabs, BorderLayout.CENTER);
setResizable(false);
pack();
setVisible(true);
}
代码示例来源:origin: 4thline/cling
public void init(StateVariableAllowedValueRange volumeRange) {
addWindowListener(
new WindowAdapter() {
@Override
public void windowClosing(WindowEvent windowEvent) {
dispose();
presenter.onViewDisposed();
}
}
);
tabs.setFont(new Font(Font.DIALOG, Font.PLAIN, 20));
for (int i = 0; i < SUPPORTED_INSTANCES; i++) {
InstanceView controlView = renderingControlViewInstance.get();
controlView.init(i, volumeRange);
controlViews.put(i, controlView);
tabs.addTab(Integer.toString(i), controlView.asUIComponent());
}
getContentPane().add(tabs, BorderLayout.CENTER);
setResizable(false);
pack();
setVisible(true);
}
代码示例来源:origin: magefree/mage
private void setGUISize() {
jTablePlayers.getTableHeader().setFont(GUISizeHelper.tableFont);
jTablePlayers.setFont(GUISizeHelper.tableFont);
jTablePlayers.setRowHeight(GUISizeHelper.getTableRowHeight());
jScrollPanePlayers.getVerticalScrollBar().setPreferredSize(new Dimension(GUISizeHelper.scrollBarSize, 0));
jScrollPanePlayers.getHorizontalScrollBar().setPreferredSize(new Dimension(0, GUISizeHelper.scrollBarSize));
jScrollPaneSystem.getVerticalScrollBar().setPreferredSize(new Dimension(GUISizeHelper.scrollBarSize, 0));
jScrollPaneSystem.getHorizontalScrollBar().setPreferredSize(new Dimension(0, GUISizeHelper.scrollBarSize));
jTabbedPaneText.setFont(GUISizeHelper.getTabFont());
jSplitPane1.setDividerSize(GUISizeHelper.dividerBarSize);
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setFont(Font aFont) {
super.setFont(aFont);
}
代码示例来源:origin: protegeproject/protege
@Override
public void installUI(JComponent c) {
super.installUI(c);
if (OSUtils.isOSX()) {
tabPane.setFont(OS_X_FONT);
}
else {
tabPane.setFont(UIManager.getFont("TabbedPane.font"));
}
}
代码示例来源: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: 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: protegeproject/protege
protected void installDefaults() {
super.installDefaults();
tabAreaInsets.left = 0;
selectedTabPadInsets = emptyInsets;
tabInsets = selectedTabPadInsets;
if (OSUtils.isOSX()) {
tabPane.setFont(OS_X_FONT);
}
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JTabbedPane tabbedPane = (JTabbedPane) c;
tabbedPane.setOpaque (false);
tabbedPane.setFont (UIManager.getFont ("TabbedPane.font"));
tabbedPane.setBackground (UIManager.getColor ("TabbedPane.background"));
tabbedPane.setForeground (UIManager.getColor ("TabbedPane.foreground"));
tabbedPane.setBorder (UIManager.getBorder ("TabbedPane.border"));
darkShadow = UIManager.getColor ("TabbedPane.darkShadow");
shadow = UIManager.getColor ("TabbedPane.shadow");
lightHighlight = UIManager.getColor ("TabbedPane.highlight");
}
代码示例来源:origin: jpos/jPOS
public JComponent create (UI ui, Element e) {
this.ui = ui;
p = new JTabbedPane ();
String font = e.getAttributeValue ("font");
if (font != null)
p.setFont (Font.decode (font));
Iterator iter = e.getChildren ("pane").iterator();
while (iter.hasNext()) {
add (p, (Element) iter.next ());
}
p.addChangeListener(this);
return p;
}
代码示例来源: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: 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: hs-web/hsweb-generator
protected void renderPanel() {
JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.setFont(BASIC_FONT_MIN);
//加入panel到选项卡
for (GeneratorPanel panel : panels) {
tabbedPane.addTab(panel.getTitle(), null, panel, panel.getTooltip());
panel.init(this);
}
//触发选中第一个
if (panels.size() > 0) {
panels.get(0).onSelected();
}
//添加切换选项卡事件监听器
tabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
int index = ((JTabbedPane) e.getSource()).getSelectedIndex();
panels.get(index).onSelected();
}
});
this.add(tabbedPane);
}
代码示例来源: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: abc9070410/JComicDownloader
tabbedPane.setFont(SetUp.getDefaultFont());
代码示例来源:origin: MegaMek/megamek
tabs.setFont(tabPanelFont);
代码示例来源:origin: CallForSanity/Gaalop
private void initialize() {
setLayout(new BorderLayout());
add(pluginPanes, BorderLayout.CENTER);
Font font = new Font("Arial", Font.PLAIN, FontSize.getGuiFontSize());
pluginPanes.setFont(font);
for (CodeParserPlugin parser: Plugins.getCodeParserPlugins())
addPluginConfig(parser);
for (GlobalSettingsStrategyPlugin global: Plugins.getGlobalSettingsStrategyPlugins())
addPluginConfig(global);
for (VisualCodeInserterStrategyPlugin visStrat: Plugins.getVisualizerStrategyPlugins())
addPluginConfig(visStrat);
for (AlgebraStrategyPlugin algebra: Plugins.getAlgebraStrategyPlugins())
addPluginConfig(algebra);
for (OptimizationStrategyPlugin strategy : Plugins.getOptimizationStrategyPlugins())
addPluginConfig(strategy);
List<CodeGeneratorPlugin> sortedPlugins = new ArrayList<CodeGeneratorPlugin>(Plugins.getCodeGeneratorPlugins());
Collections.sort(sortedPlugins, new PluginSorter());
for (CodeGeneratorPlugin generator : sortedPlugins) {
addPluginConfig(generator);
}
pluginPanes.setSelectedIndex(0);
}
代码示例来源:origin: ATLauncher/ATLauncher
tabbedPane.setFont(App.THEME.getTabFont().deriveFont(34.0F));
for (Tab tab : this.tabs) {
this.tabbedPane.addTab(tab.getTitle(), (JPanel) tab);
代码示例来源:origin: org.biojava.thirdparty/forester
_tabbed_pane.setFont( ControlPanel.jcb_font );
内容来源于网络,如有侵权,请联系作者删除!