当前位置: 首页>>代码示例>>Java>>正文


Java JXTaskPaneContainer类代码示例

本文整理汇总了Java中org.jdesktop.swingx.JXTaskPaneContainer的典型用法代码示例。如果您正苦于以下问题:Java JXTaskPaneContainer类的具体用法?Java JXTaskPaneContainer怎么用?Java JXTaskPaneContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JXTaskPaneContainer类属于org.jdesktop.swingx包,在下文中一共展示了JXTaskPaneContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSelectorComponent

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private JComponent getSelectorComponent(List<Demo> demoSet) {
    JXTaskPaneContainer container = new JXTaskPaneContainer() {
        // Issue #1189-swingx: reasonable implementation of block increment
        @Override
        public int getScrollableBlockIncrement(Rectangle visibleRect,
                int orientation, int direction) {
            return SwingConstants.VERTICAL == orientation ? visibleRect.height :
                visibleRect.width;
        }
        
    };
    container.setLayout(new VerticalLayout(0));
    container.setBorder(BorderFactory.createEmptyBorder());
    for (Demo demo : demoSet) {
        String category = demo.getCategory();
        JXTaskPane taskPane = getTaskPane(category);
        if (taskPane == null) {
            taskPane = createTaskPane(demo);
            addTaskPane(taskPane, category);
            container.add(taskPane);
        }
        addDemo(taskPane, demo);
    }
    JScrollPane pane = new JScrollPane(container);
    return pane;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:27,代码来源:DemoSelector.java

示例2: SideActionsGroupsListPanel

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
public SideActionsGroupsListPanel()
{
	super();

	contentPanel = new JXTaskPaneContainer();
	contentPanel.setScrollableWidthHint(ScrollableSizeHint.FIT);
	contentPanel.setOpaque(false);

	final JScrollPane contentPaneScroll = new JScrollPane();
	contentPaneScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	contentPaneScroll.getViewport().add(contentPanel);
	contentPaneScroll.setOpaque(false);

	setLayout(new BorderLayout());
	this.add(contentPaneScroll, BorderLayout.CENTER);
	this.setOpaque(false);

	refreshUI();
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:20,代码来源:SideActionsGroupsListPanel.java

示例3: createAdvancedOptionsTaskPaneContainer

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private Component createAdvancedOptionsTaskPaneContainer(JPanel advancedPortsPane) {
	JXTaskPaneContainer advancedOptionsTaskPaneContainer =
			new JXTaskPaneContainer();
	advancedOptionsTaskPaneContainer.setOpaque(false);
	
	JXTaskPane advancedOptionsTaskPane = new JXTaskPane();
	advancedOptionsTaskPane.setTitle(getAdvancedOptionsTitle());
	advancedOptionsTaskPane.setCollapsed(true);
	advancedOptionsTaskPane.addPropertyChangeListener("collapsed",
			new PropertyChangeListener() {
		@Override
		public void propertyChange(PropertyChangeEvent evt) {
			_pack();
		}
	});
	advancedOptionsTaskPane.add(advancedPortsPane, BorderLayout.CENTER);
	advancedOptionsTaskPaneContainer.add(advancedOptionsTaskPane);

	return advancedOptionsTaskPaneContainer;
}
 
开发者ID:sing-group,项目名称:aibench-project,代码行数:21,代码来源:ParamsWindow.java

示例4: addBasicDefaults

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
@Override
protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
  super.addBasicDefaults(addon, defaults);
  
  defaults.add(JXTaskPaneContainer.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicTaskPaneContainerUI");
  defaults.add("TaskPaneContainer.background", UIManagerExt.getSafeColor("Desktop.background",
                      new ColorUIResource(Color.decode("#005C5C"))));
  defaults.add("TaskPaneContainer.border", new BorderUIResource(BorderFactory.createEmptyBorder(10, 10, 0, 10)));
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:10,代码来源:TaskPaneContainerAddon.java

示例5: installUI

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
   * {@inheritDoc}
   */
  @Override
public void installUI(JComponent c) {
    super.installUI(c);
    taskPane = (JXTaskPaneContainer)c;
    installDefaults();
    
    LayoutManager manager = taskPane.getLayout();
    
    if (manager == null || manager instanceof UIResource) {
        taskPane.setLayout(createDefaultLayout());
    }
  }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:16,代码来源:BasicTaskPaneContainerUI.java

示例6: createButtonStack

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private JComponent createButtonStack(JComponent demoContainer) {
    JComponent buttonStack = new JXTaskPaneContainer();
    JXTaskPane taskPane = new JXTaskPane();
    taskPane.setTitle("demo");
    taskPane.add(createTextAction(demoContainer));
    taskPane.add(createPageAction(demoContainer));
    buttonStack.add(taskPane);
    return buttonStack;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:10,代码来源:LoadedPanelExperiments.java

示例7: setupTaskPane

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
public void setupTaskPane(JComponent... pTaskPane) {
    taskContainer = new JXTaskPaneContainer();
    for (JComponent aPTaskPane : pTaskPane) {
        taskContainer.add(aPTaskPane);
    }
    menuPanel.remove(jXTaskPaneContainer1);
    JScrollPane s = new JScrollPane(taskContainer);
    s.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    menuPanel.add(s, BorderLayout.CENTER);
    taskContainer.setBackground(getBackground());
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:12,代码来源:GenericTestPanel.java

示例8: initComponents

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    menuPanel = new org.jdesktop.swingx.JXCollapsiblePane();
    jXTaskPaneContainer1 = new org.jdesktop.swingx.JXTaskPaneContainer();
    centerPanel = new org.jdesktop.swingx.JXPanel();
    menuCollapsePanel = new org.jdesktop.swingx.JXPanel();

    setPreferredSize(new java.awt.Dimension(190, 100));
    setLayout(new java.awt.BorderLayout());

    menuPanel.setAnimated(false);
    menuPanel.setDirection(org.jdesktop.swingx.JXCollapsiblePane.Direction.RIGHT);
    menuPanel.setInheritAlpha(false);

    jXTaskPaneContainer1.setBackground(new java.awt.Color(240, 240, 240));
    jXTaskPaneContainer1.setMinimumSize(new java.awt.Dimension(170, 10));
    jXTaskPaneContainer1.setPreferredSize(new java.awt.Dimension(170, 10));
    menuPanel.add(jXTaskPaneContainer1, java.awt.BorderLayout.CENTER);

    add(menuPanel, java.awt.BorderLayout.EAST);

    centerPanel.setPreferredSize(new java.awt.Dimension(20, 20));
    centerPanel.setLayout(new java.awt.BorderLayout());

    menuCollapsePanel.setBackground(new java.awt.Color(204, 204, 204));
    menuCollapsePanel.setPreferredSize(new java.awt.Dimension(20, 473));
    menuCollapsePanel.setLayout(new java.awt.BorderLayout());
    centerPanel.add(menuCollapsePanel, java.awt.BorderLayout.EAST);

    add(centerPanel, java.awt.BorderLayout.CENTER);
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:39,代码来源:GenericTestPanel.java

示例9: installUI

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public void installUI(JComponent c) {
  super.installUI(c);
  taskPane = (JXTaskPaneContainer)c;
  installDefaults();
  
  LayoutManager manager = taskPane.getLayout();
  
  if (manager == null || manager instanceof UIResource) {
      taskPane.setLayout(createDefaultLayout());
  }
}
 
开发者ID:sing-group,项目名称:aibench-project,代码行数:15,代码来源:BasicTaskPaneContainerUI.java

示例10: initializeFirstStep

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
 * Initializes the internal frame for the first step. Creates necessery 
 * components and sets them to frame.
 *
 */
public void initializeFirstStep(){		
	firstStepOptionPanel = new JXTaskPaneContainer();
	firstStepOptionPanel.add(this.createDelimSelectorPanel());
	firstStepOptionPanel.add(this.createDecimalSeparatorPanel());
	firstStepOptionPanel.setBackgroundPainter(new MattePainter(Color.white));
	JScrollPane scroll = new JScrollPane(firstStepOptionPanel);
	scroll.setBorder(BorderFactory.createEmptyBorder());
	this.setContent(scroll);
}
 
开发者ID:chipster,项目名称:chipster,代码行数:15,代码来源:ToolsInternalFrame.java

示例11: initializeSecondStep

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
	 * Initializes the internal frame for the second step. Creates necesserly 
	 * components and sets them to frame.
	 *
	 */
	public void initializeSecondStep(){
		secondStepOptionPanel = new JXTaskPaneContainer();

//		secondStepOptionPanel.add(this.getDataTypePanel());
		secondStepOptionPanel.add(this.getChipCountPanel());		
		secondStepOptionPanel.add(this.createGuessTheRestPanel());		
		secondStepOptionPanel.add(this.createDataTrimmingPanel());
		secondStepOptionPanel.setBackgroundPainter(new MattePainter(Color.white));
		JScrollPane scroll = new JScrollPane(secondStepOptionPanel);
		scroll.setBorder(BorderFactory.createEmptyBorder());
		this.setContent(scroll);
	}
 
开发者ID:chipster,项目名称:chipster,代码行数:18,代码来源:ToolsInternalFrame.java

示例12: ScriptMenu

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private ScriptMenu() {
    taskPane = new JXTaskPaneContainer();
    taskPane.applyComponentOrientation(getComponentOrientation());
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:5,代码来源:JPrincipalApp.java

示例13: getTaskPane

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
public JXTaskPaneContainer getTaskPane() {            
    return taskPane;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:JPrincipalApp.java

示例14: addWindowsDefaults

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
  super.addWindowsDefaults(addon, defaults);
  if (addon instanceof WindowsClassicLookAndFeelAddons) {
    defaults.add("TaskPaneContainer.background", UIManagerExt.getSafeColor("List.background",
              new ColorUIResource(Color.decode("#005C5C"))));
  } else if (addon instanceof WindowsLookAndFeelAddons) {     
    String xpStyle = OS.getWindowsVisualStyle();
    ColorUIResource background;
    Color backgroundGradientStart;
    Color backgroundGradientEnd;
    
    if (WindowsLookAndFeelAddons.HOMESTEAD_VISUAL_STYLE
      .equalsIgnoreCase(xpStyle)) {        
      background = new ColorUIResource(201, 215, 170);
      backgroundGradientStart = new Color(204, 217, 173);
      backgroundGradientEnd = new Color(165, 189, 132);
    } else if (WindowsLookAndFeelAddons.SILVER_VISUAL_STYLE
      .equalsIgnoreCase(xpStyle)) {
      background = new ColorUIResource(192, 195, 209);
      backgroundGradientStart = new Color(196, 200, 212);
      backgroundGradientEnd = new Color(177, 179, 200);
    } else {        
      if (OS.isWindowsVista()) {
        final Toolkit toolkit = Toolkit.getDefaultToolkit();
        background = new ColorUIResource((Color)toolkit.getDesktopProperty("win.3d.backgroundColor"));
        backgroundGradientStart = (Color)toolkit.getDesktopProperty("win.frame.activeCaptionColor");
        backgroundGradientEnd = (Color)toolkit.getDesktopProperty("win.frame.inactiveCaptionColor");
      } else {
        background = new ColorUIResource(117, 150, 227);
        backgroundGradientStart = new ColorUIResource(123, 162, 231);
        backgroundGradientEnd = new ColorUIResource(99, 117, 214);
      }
    }      
    
    defaults.add("TaskPaneContainer.backgroundPainter", new PainterUIResource<JXTaskPaneContainer>(
            new MattePainter(new GradientPaint(
                    0f, 0f, backgroundGradientStart,
                    0f, 1f, backgroundGradientEnd),
                    true)));
    defaults.add("TaskPaneContainer.background", background);
  }
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:47,代码来源:TaskPaneContainerAddon.java

示例15: createTaskPaneDemo

import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private void createTaskPaneDemo() {
    JXTaskPaneContainer tpc = new JXTaskPaneContainer();
    
    // "System" GROUP
    systemGroup = new JXTaskPane();
    systemGroup.setName("systemGroup");
    tpc.add(systemGroup);
    
    // "Office" GROUP
    officeGroup = new JXTaskPane();
    officeGroup.setName("officeGroup");
    tpc.add(officeGroup);
    
    // "SEE ALSO" GROUP and ACTIONS
    seeAlsoGroup = new JXTaskPane();
    seeAlsoGroup.setName("seeAlsoGroup");
    tpc.add(seeAlsoGroup);
    
    // "Details" GROUP
    detailsGroup = new JXTaskPane();
    detailsGroup.setName("detailsGroup");
    
    //TODO better injection for editor area
    JEditorPane area = new JEditorPane("text/html", "<html>");
    area.setName("detailsArea");
    
    area.setFont(UIManager.getFont("Label.font"));
    
    Font defaultFont = UIManager.getFont("Button.font");
    
    String stylesheet = "body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; font-family: "
            + defaultFont.getName()
            + "; font-size: "
            + defaultFont.getSize()
            + "pt;  }"
            + "a, p, li { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; font-family: "
            + defaultFont.getName()
            + "; font-size: "
            + defaultFont.getSize()
            + "pt;  }";
    if (area.getDocument() instanceof HTMLDocument) {
        HTMLDocument doc = (HTMLDocument)area.getDocument();
        try {
            doc.getStyleSheet().loadRules(new java.io.StringReader(stylesheet),
                    null);
        } catch (Exception e) {
            // TODO: handle exception
        }
    }
    
    detailsGroup.add(area);
    
    tpc.add(detailsGroup);
    
    add(new JScrollPane(tpc));
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:57,代码来源:TaskPaneDemo.java


注:本文中的org.jdesktop.swingx.JXTaskPaneContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。