javax.swing.JInternalFrame.getContentPane()方法的使用及代码示例

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

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

JInternalFrame.getContentPane介绍

暂无

代码示例

代码示例来源:origin: pentaho/mondrian

/**
 * returns the currently selected schema explorer object
 *
 * @return current schema explorer object
 */
public SchemaExplorer getCurrentSchemaExplorer() {
  JInternalFrame jf = desktopPane.getSelectedFrame();
  if (jf != null && jf.getContentPane().getComponentCount() > 0 && jf
    .getContentPane().getComponent(0) instanceof SchemaExplorer)
  {
    return (SchemaExplorer) jf.getContentPane().getComponent(0);
  }
  return null;
}

代码示例来源:origin: pentaho/mondrian

public void focusGained(FocusEvent e) {
  if (schemaFrame.getContentPane()
    .getComponent(0) instanceof SchemaExplorer)
  {
    SchemaExplorer se = (SchemaExplorer)
      schemaFrame.getContentPane().getComponent(0);
    // update view menu based on schemaframe who gained
    // focus
    viewXmlMenuItem.setSelected(
      se.isEditModeXML());
  }
}

代码示例来源:origin: pentaho/mondrian

private void updateMDXCatalogList() {
  Iterator<JInternalFrame> it = mdxWindows.iterator();
  while (it.hasNext()) {
    JInternalFrame elem = it.next();
    QueryPanel qp = (QueryPanel) elem.getContentPane().getComponent(0);
    qp.setSchemaWindowMap(schemaWindowMap);
  }
}

代码示例来源:origin: pentaho/mondrian

public void focusLost(FocusEvent e) {
    if (schemaFrame.getContentPane()
      .getComponent(0) instanceof SchemaExplorer)
    {
      SchemaExplorer se = (SchemaExplorer)
        schemaFrame.getContentPane().getComponent(0);
      // update view menu based on
      viewXmlMenuItem.setSelected(
        se.isEditModeXML());
    }
  }
});

代码示例来源:origin: pentaho/mondrian

public void actionPerformed(ActionEvent e) {
    JInternalFrame jf = desktopPane.getSelectedFrame();
    if (jf != null && jf.getContentPane()
      .getComponent(0) instanceof SchemaExplorer)
    {
      SchemaExplorer se =
        (SchemaExplorer) jf.getContentPane()
          .getComponent(0);
      TreePath tpath = se.tree.getSelectionPath();
      se.delete(tpath);
    }
  }
});

代码示例来源:origin: pentaho/mondrian

private boolean checkFileOpen(File file) {
  Iterator<JInternalFrame> it = schemaWindowMap.keySet().iterator();
  // keys=schemaframes
  while (it.hasNext()) {
    JInternalFrame elem = it.next();
    File f = ((SchemaExplorer) elem.getContentPane().getComponent(0))
      .getSchemaFile();
    if (f.equals(file)) {
      try {
        // make the schema file active
        elem.setSelected(true);
        return true;
      } catch (Exception ex) {
        // remove file from map as schema frame does not exist
        schemaWindowMap.remove(elem);
        break;
      }
    }
  }
  return false;
}

代码示例来源:origin: pentaho/mondrian

public void internalFrameClosing(InternalFrameEvent e) {
    if (schemaFrame.getContentPane()
      .getComponent(0) instanceof SchemaExplorer)
    {
      SchemaExplorer se =
        (SchemaExplorer) schemaFrame.getContentPane()
          .getComponent(0);
      int response = confirmFrameClose(schemaFrame, se);
      if (response == 3) {    // not dirty
        if (se.isNewFile()) {
          se.getSchemaFile().delete();
        }
        // default case for no save and not dirty
        schemaWindowMap.remove(schemaFrame);
        updateMDXCatalogList();
        schemaFrame.dispose();
        windowMenu.remove(schemaMenuItem);
      }
    }
  }
});

代码示例来源:origin: pentaho/mondrian

private void viewXMLMenuItemActionPerformed(ActionEvent evt) {
  JInternalFrame jf = desktopPane.getSelectedFrame();
  boolean oldValue = viewXmlMenuItem.getState();
  if (jf != null
    && jf.getContentPane().getComponent(0) instanceof SchemaExplorer)
  {
    SchemaExplorer se =
      (SchemaExplorer) jf.getContentPane().getComponent(0);
    // Call schema explorer's view xml event and update the workbench's
    // view menu accordingly'
    ((JCheckBoxMenuItem) evt.getSource()).setSelected(se.editMode(evt));
    return;
  }
  viewXmlMenuItem.setSelected(!oldValue);
}

代码示例来源:origin: pentaho/mondrian

continue;
if (sf.getContentPane().getComponent(0)
  instanceof SchemaExplorer)
    (SchemaExplorer) sf.getContentPane().getComponent(0);
  sf.setSelected(true);
  int response = confirmFrameClose(sf, se);

代码示例来源:origin: geotools/geotools

frame.addInternalFrameListener(InternalWindowListener.wrap(listener));
((JDesktopPane) owner).add(frame);
frame.getContentPane().add(panel);
frame.pack();
return frame;

代码示例来源:origin: pentaho/mondrian

jf.getContentPane().add(jPanel);

代码示例来源:origin: pentaho/mondrian

if (jf == null || jf.getContentPane() == null) {
  return;
if (jf.getContentPane().getComponent(0) instanceof SchemaExplorer) {
  SchemaExplorer se =
    (SchemaExplorer) jf.getContentPane().getComponent(0);

代码示例来源:origin: pentaho/mondrian

private void saveAsMenuItemActionPerformed(ActionEvent evt) {
  JInternalFrame jf = desktopPane.getSelectedFrame();
  if (jf != null && jf.getContentPane()
    .getComponent(0) instanceof SchemaExplorer)
      (SchemaExplorer) jf.getContentPane().getComponent(0);
    java.io.File schemaFile = se.getSchemaFile();
    java.io.File oldSchemaFile = schemaFile;

代码示例来源:origin: pentaho/mondrian

theSchemaFrames.next();
SchemaExplorer theSchemaExplorer =
  (SchemaExplorer) theSchemaFrame.getContentPane()
    .getComponent(0);
File theFile = theSchemaExplorer.getSchemaFile();
  (JdbcExplorer) jdbcFrame.getContentPane().getComponent(0);
explorer.resetMetaData(jdbcMetaData);

代码示例来源:origin: pentaho/mondrian

jf.getContentPane().add(jdbce);
jf.setBounds(0, 0, 500, 480);
jf.setClosable(true);

代码示例来源:origin: pentaho/mondrian

QueryPanel qp = new QueryPanel(this);
jf.getContentPane().add(qp);
jf.setBounds(0, 0, 500, 480);
jf.setClosable(true);

代码示例来源:origin: pentaho/mondrian

schemaFrame.getContentPane().add(
  new SchemaExplorer(
    this, file, jdbcMetaData, newFile, schemaFrame));
  ((SchemaExplorer) schemaFrame.getContentPane().getComponent(0))
    .getErrMsg();
if (errorOpening != null) {

代码示例来源:origin: pentaho/mondrian

(SchemaExplorer) sf.getContentPane().getComponent(0);
if (se.isNewFile()) {
  JOptionPane.showMessageDialog(

代码示例来源:origin: org.cytoscape/swing-application-impl

@Override
  public void componentResized(ComponentEvent e) {
    view.setVisualProperty(BasicVisualLexicon.NETWORK_WIDTH, (double)iframe.getContentPane().getWidth());
    view.setVisualProperty(BasicVisualLexicon.NETWORK_HEIGHT, (double)iframe.getContentPane().getHeight());
  }
});

代码示例来源:origin: com.jtattoo/JTattoo

public void uninstallUI(JComponent c) {
  Container cp = frame.getContentPane();
  if (cp instanceof JComponent) {
    JComponent contentPane = (JComponent) cp;
    if (contentPane.getBorder() == HANDY_EMPTY_BORDER) {
      contentPane.setBorder(null);
    }
  }
  super.uninstallUI(c);
}

相关文章

JInternalFrame类方法