javax.swing.JTabbedPane.setBorder()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(11.0k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中javax.swing.JTabbedPane.setBorder()方法的一些代码示例,展示了JTabbedPane.setBorder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.setBorder()方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:setBorder

JTabbedPane.setBorder介绍

暂无

代码示例

代码示例来源:origin: wiztools/rest-client

jtp.setBorder(BorderFactory.createEmptyBorder(
    RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));

代码示例来源:origin: wiztools/rest-client

jtp.setBorder(BorderFactory.createEmptyBorder(
    RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jtp.addTab("Encoder/Decoder", jp);

代码示例来源:origin: winder/Universal-G-Code-Sender

setMinimumSize(new java.awt.Dimension(640, 520));
controlContextTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
controlContextTabbedPane.setMinimumSize(new java.awt.Dimension(395, 175));
controlContextTabbedPane.setPreferredSize(new java.awt.Dimension(2000, 283));

代码示例来源:origin: winder/Universal-G-Code-Sender

bottomTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
bottomTabbedPane.setMinimumSize(new java.awt.Dimension(0, 0));
bottomTabbedPane.setPreferredSize(new java.awt.Dimension(468, 100));
controlContextTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
controlContextTabbedPane.setMinimumSize(new java.awt.Dimension(395, 175));
controlContextTabbedPane.addComponentListener(new java.awt.event.ComponentAdapter() {

代码示例来源:origin: stackoverflow.com

UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );

JFrame frame = new JFrame();
frame.setBounds( 50, 50, 800, 600 );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );

JPanel glasspane = new JPanel(new FlowLayout(FlowLayout.RIGHT));

frame.setGlassPane( glasspane );

glasspane.setOpaque( false );
JTextField textField = new JTextField("Search");
glasspane.add(textField);
glasspane.setVisible( true );

JTabbedPane tabs = new JTabbedPane();
tabs.setBorder( BorderFactory.createEmptyBorder( 10, 5, 5, 5 ) );
tabs.addTab( "Lorem", null );
tabs.addTab( "Ipsum", null );
tabs.addTab( "Dolor", null );
frame.setContentPane( tabs );
frame.setVisible( true );

代码示例来源:origin: dsukhoroslov/bagri

public BagriManagementPanel(EventBus eventBus) {
  super(new GridLayout(1, 1));
  this.eventBus = eventBus;
  setBorder(BorderFactory.createEmptyBorder());
  tabbedPane = new JTabbedPane();
  tabbedPane.addTab(BagriManager.BAGRI_MANAGER, createMainPanel());
  add(tabbedPane);
  tabbedPane.setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: dsukhoroslov/bagri

public UserManagementPanel(UserManagementService service, EventBus bus) {
  super(new GridLayout(1, 1));
  this.userService = service;
  this.eventBus = bus;
  tabbedPane = new JTabbedPane();
  tabbedPane.addTab(UserManagement.USER_MANAGEMENT, createMainPanel());
  add(tabbedPane);
  tabbedPane.setBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: dsukhoroslov/bagri

public ClusterManagementPanel(ClusterManagementService clusterService, EventBus eventBus) {
  super(new GridLayout(1, 1));
  this.clusterService = clusterService;
  this.eventBus = eventBus;
  tabbedPane = new JTabbedPane();
  tabbedPane.addTab(ClusterManagement.CLUSTER_MANAGEMENT, createMainPanel());
  add(tabbedPane);
  tabbedPane.setBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: dsukhoroslov/bagri

public SchemasManagementPanel(SchemaManagementService schemaService, EventBus eventBus) {
  super(new GridLayout(1, 1));
  this.schemaService= schemaService;
  this.eventBus = eventBus;
  tabbedPane = new JTabbedPane();
  tabbedPane.addTab(SchemaManagement.SCHEMA_MANAGEMENT, createSchemaManagementPanel());
  tabbedPane.addTab(SchemaManagement.PROPERTIES_MANAGEMENT, createPropertiesManagementPanel());
  add(tabbedPane);
  tabbedPane.setBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: dsukhoroslov/bagri

public NodeManagementPanel(ClusterManagementService clusterService, Node node) {
  super(new GridLayout(1, 1));
  this.clusterService = clusterService;
  this.node = node;
  tabbedPane = new JTabbedPane();
  tabbedPane.addTab(node.getName(), createMainPanel());
  add(tabbedPane);
  tabbedPane.setBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: dsukhoroslov/bagri

public SchemaPanel(SchemaManagementService schemaService, EventBus eventBus, Schema schema) {
  super(new GridLayout(1, 1));
  this.schema = schema;
  this.schemaService = schemaService;
  this.eventBus = eventBus;
  tabbedPane = new JTabbedPane();
  tabbedPane.addTab(SchemaManagement.SCHEMA_MANAGEMENT, createSchemaInfoPanel());
  tabbedPane.addTab(SchemaManagement.DOCUMENT_MANAGEMENT, createSchemaDocumentsPanel());
  tabbedPane.addTab(SchemaManagement.QUERY_MANAGEMENT, createSchemaQueryPanel());
  tabbedPane.addTab(SchemaManagement.SCHEMA_MONITORING, createSchemaMonitoringPanel());
  add(tabbedPane);
  tabbedPane.setBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源: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: com.jtattoo/JTattoo

protected void installDefaults() {
  LookAndFeel.installColorsAndFont(tabPane, "TabbedPane.background", "TabbedPane.foreground", "TabbedPane.font");
  tabAreaBackground = UIManager.getColor("TabbedPane.tabAreaBackground");
  selectedColor = UIManager.getColor("TabbedPane.selected");
  textIconGap = UIManager.getInt("TabbedPane.textIconGap");
  tabInsets = UIManager.getInsets("TabbedPane.tabInsets");
  selectedTabPadInsets = UIManager.getInsets("TabbedPane.selectedTabPadInsets");
  tabAreaInsets = UIManager.getInsets("TabbedPane.tabAreaInsets");
  contentBorderInsets = UIManager.getInsets("TabbedPane.contentBorderInsets");
  tabRunOverlay = UIManager.getInt("TabbedPane.tabRunOverlay");
  tabPane.setBorder(UIManager.getBorder("TabbedPane.boder"));
}

代码示例来源:origin: cytoscape/application

/**
 * Constructs this CytoPanel.
 */
void constructPanel() {
  // init our components
  initLabel();
  initButton();
  // add label and button components to yet another panel, 
  // so we can layout properly
  final JPanel floatDockPanel = new JPanel(new BorderLayout());
  // set float dock panel attributes
  floatDockPanel.add(floatLabel, BorderLayout.WEST);
  floatDockPanel.add(floatButton, BorderLayout.EAST);
  floatDockPanel.setBorder(new EmptyBorder(0, 1, 0, 1));
  floatDockPanel.setBackground(FLOAT_PANEL_COLOR);
  // set preferred size - we can use float or dock icon diminsions - they are the same
  FontMetrics fm = floatLabel.getFontMetrics(floatLabel.getFont());
  floatDockPanel.setMinimumSize(new Dimension((int) ((fm.stringWidth(getTitle())
                            + floatIcon.getIconWidth()) * FLOAT_PANEL_SCALE_FACTOR),
                        floatIcon.getIconHeight()));
  floatDockPanel.setPreferredSize(new Dimension((int) ((fm.stringWidth(getTitle())
                             + floatIcon.getIconWidth()) * FLOAT_PANEL_SCALE_FACTOR),
                         floatIcon.getIconHeight() + 2));
  // use the border layout for this CytoPanel
  setLayout(new BorderLayout());
  tabbedPane.setBorder(new EmptyBorder(0, 0, 0, 0));
  add(floatDockPanel, BorderLayout.NORTH);
  add(tabbedPane, BorderLayout.CENTER);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

tp.setOpaque(false);
if (UIUtils.isAquaLookAndFeel()) {
  tp.setBorder(BorderFactory.createEmptyBorder(-13, -11, 0, -10));
} else {
  tp.setBorder(BorderFactory.createEmptyBorder());
  Insets i = UIManager.getInsets("TabbedPane.contentBorderInsets"); // NOI18N
  if (i != null) tp.setBorder(BorderFactory.createEmptyBorder(-i.top, -i.left, 0, -i.right));

代码示例来源:origin: org.metawidget.modules.swing/metawidget-swing

tabbedPane.setBorder( TABBED_PANE_BORDER );
tabbedPane.setTabPlacement( mTabPlacement );

代码示例来源:origin: UNIVALI-LITE/Portugol-Studio

/**
 * {@inheritDoc}
 */
@Override
public void updateBorder ()
{
  if ( tabPane != null )
  {
    // Preserve old borders
    if ( SwingUtils.isPreserveBorders ( tabPane ) )
    {
      return;
    }
    final Insets bgInsets = getBackgroundInsets ( tabPane );
    if ( tabbedPaneStyle.equals ( TabbedPaneStyle.standalone ) )
    {
      // Standalone style border
      tabPane.setBorder ( LafUtils.createWebBorder (
          SwingUtils.max ( bgInsets, new Insets ( shadeWidth, shadeWidth, shadeWidth, shadeWidth ) ) ) );
    }
    else
    {
      // Attached style border
      tabPane.setBorder ( LafUtils.createWebBorder ( bgInsets ) );
    }
  }
}

代码示例来源:origin: org.metawidget.modules/metawidget-all

tabbedPane.setBorder( TABBED_PANE_BORDER );
tabbedPane.setTabPlacement( mTabPlacement );

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

/**
 * Creates the UI for this dialog.
 *
 * @param size dimension of the dialog
 */
protected void defaultInit(Dimension size) {
  super.setModal(true);
  setSize(size);
  pane.setBorder(new EmptyBorder(10, 10, 0, 10));
  c = new GridBagConstraints();
  c.gridx = 0;
  c.gridy = -1;
  setLayout(new BorderLayout());
  add(pane, BorderLayout.CENTER);
  add(getButtonPanel(), BorderLayout.SOUTH);
  KeyStroke escapeStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
  getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(escapeStroke, "CloseAction");
  getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escapeStroke, "CloseAction");
  getRootPane().getInputMap(JComponent.WHEN_FOCUSED).put(escapeStroke, "CloseAction");
  getRootPane().getActionMap().put("CloseAction", new AbstractAction() {
      private static final long serialVersionUID = -2305467371279192850L;
      public void actionPerformed(ActionEvent actionEvent) {
      setVisible(false);
      dispose();
    }
  });
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
protected JTabbedPane createMainPanel() {
  this.tabbedPane = new JTabbedPane(JTabbedPane.LEFT);
  this.tabbedPane.setBorder(BorderFactory.createEmptyBorder());
  Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
  double widthRatio = 0.5;
  formWidth = Math.max((int) (screenSize.width * widthRatio), MIN_TABBED_WIDTH);
  double heightRatio = 0.5;
  int formHeight = Math.max((int) (screenSize.height * heightRatio), MIN_TABBED_HEIGHT);
  tabbedPane.setPreferredSize(new Dimension(formWidth, formHeight));
  getJDialog().setMinimumSize(new Dimension(formWidth + 16, formHeight + 72));
  addTab(tabbedPane, Bundle.CTL_Panel_OperatorDescriptor_Text(), createDescriptorTab());
  currentIndex++;
  addTab(tabbedPane, Bundle.CTL_Panel_ConfigParams_Text(), createToolInfoPanel());
  currentIndex++;
  addTab(tabbedPane, Bundle.CTL_Panel_PreProcessing_Border_TitleText(), createPreProcessingTab());
  currentIndex++;
  addTab(tabbedPane, Bundle.CTL_Panel_OpParams_Border_TitleText(), createParametersTab(formWidth));
  currentIndex++;
  addTab(tabbedPane, Bundle.CTL_Panel_SysVar_Border_TitleText(), createVariablesPanel());
  currentIndex++;
  addTab(tabbedPane, Bundle.CTL_Panel_Bundle_TitleText(), createBundlePanel());
  currentIndex++;
  tabbedPane.setUI(new BasicTabbedPaneUI());
  formWidth = tabbedPane.getTabComponentAt(0).getWidth();
  return tabbedPane;
}

相关文章

JTabbedPane类方法