List of usage examples for javax.swing ScrollPaneConstants VERTICAL_SCROLLBAR_ALWAYS
int VERTICAL_SCROLLBAR_ALWAYS
To view the source code for javax.swing ScrollPaneConstants VERTICAL_SCROLLBAR_ALWAYS.
Click Source Link
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchSwing.CFFreeSwitchSwingISOCountryListJPanel.java
public CFFreeSwitchSwingISOCountryListJPanel(ICFFreeSwitchSwingSchema argSchema, ICFLibAnyObj argContainer, ICFSecurityISOCountryObj argFocus, Collection<ICFSecurityISOCountryObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();//from ww w . jav a 2 s . c o m final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:gui.MainGUI.java
private void initComponents() { panelExploration = new javax.swing.JPanel(); scrollPaneImage = new javax.swing.JScrollPane(); labelImageHolder = new javax.swing.JLabel(); buttonStart = new javax.swing.JButton(); toggleHierarchy = new javax.swing.JToggleButton(); toggleEnv = new javax.swing.JToggleButton(); buttonStep = new javax.swing.JButton(); buttonStop = new javax.swing.JButton(); labelCycleUpdate = new javax.swing.JLabel(); labelCycle = new javax.swing.JLabel(); labelExploredUpdate = new javax.swing.JLabel(); labelExplored = new javax.swing.JLabel(); buttonData = new javax.swing.JButton(); labelSpeed = new javax.swing.JLabel(); sliderSpeed = new javax.swing.JSlider(); scrollPaneRobots = new javax.swing.JScrollPane(); panelRobotInfo = new javax.swing.JPanel(); labelAvgCycle = new javax.swing.JLabel(); labelAvgCycleUpdate = new javax.swing.JLabel(); MainMenu1 = new javax.swing.JMenuBar(); menuExploration1 = new javax.swing.JMenu(); menuCommunication1 = new javax.swing.JMenu(); menuEnvironment1 = new javax.swing.JMenu(); menuRobots1 = new javax.swing.JMenu(); menuLogs1 = new javax.swing.JMenu(); setTitle("Multi-robot Exploration Simulator (MRESim) v2.0"); setName("OuterFrame"); // NOI18N setResizable(false);// w w w .j ava 2 s.c o m panelExploration.setMaximumSize(new java.awt.Dimension(800, 600)); panelExploration.setMinimumSize(new java.awt.Dimension(800, 600)); panelExploration.setRequestFocusEnabled(false); labelImageHolder.setBackground(new java.awt.Color(255, 255, 102)); labelImageHolder.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); labelImageHolder.setMaximumSize(new java.awt.Dimension(800, 600)); labelImageHolder.setMinimumSize(new java.awt.Dimension(800, 600)); labelImageHolder.setPreferredSize(new java.awt.Dimension(800, 600)); scrollPaneImage.setViewportView(labelImageHolder); javax.swing.GroupLayout panelExplorationLayout = new javax.swing.GroupLayout(panelExploration); panelExploration.setLayout(panelExplorationLayout); panelExplorationLayout.setHorizontalGroup( panelExplorationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( scrollPaneImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)); panelExplorationLayout.setVerticalGroup( panelExplorationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( scrollPaneImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)); buttonStart.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N buttonStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/buttonPlay.png"))); // NOI18N buttonStart.setToolTipText("Start simulation"); buttonStart.setBorderPainted(false); buttonStart.setContentAreaFilled(false); buttonStart.setIconTextGap(0); buttonStart.setMaximumSize(new java.awt.Dimension(36, 36)); buttonStart.setMinimumSize(new java.awt.Dimension(36, 36)); buttonStart.setPreferredSize(new java.awt.Dimension(36, 36)); buttonStart.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonStartActionPerformed(evt); } }); toggleHierarchy .setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/buttonHierarchy.png"))); // NOI18N toggleHierarchy.setSelected(true); toggleHierarchy.setToolTipText("Toggle hierarchy"); toggleHierarchy.setBorderPainted(false); toggleHierarchy.setContentAreaFilled(false); toggleHierarchy.setMaximumSize(new java.awt.Dimension(36, 36)); toggleHierarchy.setMinimumSize(new java.awt.Dimension(36, 36)); toggleHierarchy.setPreferredSize(new java.awt.Dimension(36, 36)); toggleHierarchy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toggleHierarchyActionPerformed(evt); } }); toggleEnv.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/buttonEnvironment.png"))); // NOI18N toggleEnv.setSelected(true); toggleEnv.setToolTipText("Toggle environment"); toggleEnv.setBorderPainted(false); toggleEnv.setContentAreaFilled(false); toggleEnv.setMaximumSize(new java.awt.Dimension(36, 36)); toggleEnv.setMinimumSize(new java.awt.Dimension(36, 36)); toggleEnv.setPreferredSize(new java.awt.Dimension(36, 36)); toggleEnv.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toggleEnvActionPerformed(evt); } }); buttonStep.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N buttonStep.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/buttonStep.png"))); // NOI18N buttonStep.setToolTipText("Take one step"); buttonStep.setBorderPainted(false); buttonStep.setContentAreaFilled(false); buttonStep.setMaximumSize(new java.awt.Dimension(36, 36)); buttonStep.setMinimumSize(new java.awt.Dimension(36, 36)); buttonStep.setPreferredSize(new java.awt.Dimension(36, 36)); buttonStep.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonStepActionPerformed(evt); } }); buttonStop.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N buttonStop.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/buttonStop.png"))); // NOI18N buttonStop.setToolTipText("Reset simulation"); buttonStop.setBorderPainted(false); buttonStop.setContentAreaFilled(false); buttonStop.setMaximumSize(new java.awt.Dimension(36, 36)); buttonStop.setMinimumSize(new java.awt.Dimension(36, 36)); buttonStop.setPreferredSize(new java.awt.Dimension(36, 36)); buttonStop.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonStopActionPerformed(evt); } }); labelCycleUpdate.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelCycleUpdate.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); labelCycleUpdate.setText("0"); labelCycle.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelCycle.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); labelCycle.setText("Cycle:"); labelExploredUpdate.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelExploredUpdate.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); labelExploredUpdate.setText("0"); labelExplored.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelExplored.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); labelExplored.setText("% Explored:"); buttonData.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/buttonData.png"))); // NOI18N buttonData.setBorderPainted(false); buttonData.setContentAreaFilled(false); buttonData.setMaximumSize(new java.awt.Dimension(36, 36)); buttonData.setMinimumSize(new java.awt.Dimension(36, 36)); buttonData.setPreferredSize(new java.awt.Dimension(36, 36)); buttonData.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonDataActionPerformed(evt); } }); labelSpeed.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelSpeed.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); labelSpeed.setText("Speed:"); sliderSpeed.setMajorTickSpacing(1); sliderSpeed.setMaximum(10); sliderSpeed.setSnapToTicks(true); sliderSpeed.setToolTipText("Simulation speed"); sliderSpeed.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { sliderSpeedStateChanged(evt); } }); scrollPaneRobots.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPaneRobots.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPaneRobots.setMinimumSize(new java.awt.Dimension(21, 22)); scrollPaneRobots.setPreferredSize(new java.awt.Dimension(0, 0)); panelRobotInfo.setPreferredSize(new java.awt.Dimension(273, 600)); javax.swing.GroupLayout panelRobotInfoLayout = new javax.swing.GroupLayout(panelRobotInfo); panelRobotInfo.setLayout(panelRobotInfoLayout); panelRobotInfoLayout.setHorizontalGroup(panelRobotInfoLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 273, Short.MAX_VALUE)); panelRobotInfoLayout.setVerticalGroup(panelRobotInfoLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 600, Short.MAX_VALUE)); scrollPaneRobots.setViewportView(panelRobotInfo); labelAvgCycle.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelAvgCycle.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); labelAvgCycle.setText("Avg Cycle:"); labelAvgCycleUpdate.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N labelAvgCycleUpdate.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); labelAvgCycleUpdate.setText("0"); MainMenu1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N menuExploration1.setText("Exploration"); menuExploration1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N menuExploration1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { menuExplorationMouseClicked(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { menuExplorationMouseReleased(evt); } }); menuExploration1.addMenuDragMouseListener(new javax.swing.event.MenuDragMouseListener() { public void menuDragMouseDragged(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseEntered(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseExited(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseReleased(javax.swing.event.MenuDragMouseEvent evt) { menuExplorationMenuDragMouseReleased(evt); } }); MainMenu1.add(menuExploration1); menuCommunication1.setText("Communication"); menuCommunication1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N menuCommunication1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { menuCommunicationMouseClicked(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { menuCommunicationMouseReleased(evt); } }); menuCommunication1.addMenuDragMouseListener(new javax.swing.event.MenuDragMouseListener() { public void menuDragMouseDragged(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseEntered(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseExited(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseReleased(javax.swing.event.MenuDragMouseEvent evt) { menuCommunicationMenuDragMouseReleased(evt); } }); MainMenu1.add(menuCommunication1); menuEnvironment1.setText("Environment"); menuEnvironment1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N menuEnvironment1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { menuEnvironmentMouseClicked(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { menuEnvironmentMouseReleased(evt); } }); menuEnvironment1.addMenuDragMouseListener(new javax.swing.event.MenuDragMouseListener() { public void menuDragMouseDragged(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseEntered(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseExited(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseReleased(javax.swing.event.MenuDragMouseEvent evt) { menuEnvironmentMenuDragMouseReleased(evt); } }); MainMenu1.add(menuEnvironment1); menuRobots1.setText("Robots"); menuRobots1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N menuRobots1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { menuRobotsMouseClicked(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { menuRobotsMouseReleased(evt); } }); menuRobots1.addMenuDragMouseListener(new javax.swing.event.MenuDragMouseListener() { public void menuDragMouseDragged(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseEntered(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseExited(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseReleased(javax.swing.event.MenuDragMouseEvent evt) { menuRobotsMenuDragMouseReleased(evt); } }); MainMenu1.add(menuRobots1); menuLogs1.setText("Logs"); menuLogs1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N menuLogs1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { menuLogsMouseClicked(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { menuLogsMouseReleased(evt); } }); menuLogs1.addMenuDragMouseListener(new javax.swing.event.MenuDragMouseListener() { public void menuDragMouseDragged(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseEntered(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseExited(javax.swing.event.MenuDragMouseEvent evt) { } public void menuDragMouseReleased(javax.swing.event.MenuDragMouseEvent evt) { menuLogsMenuDragMouseReleased(evt); } }); MainMenu1.add(menuLogs1); setJMenuBar(MainMenu1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(panelExploration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(scrollPaneRobots, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(labelSpeed, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sliderSpeed, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(164, 164, 164) .addComponent(buttonStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(buttonStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(buttonStop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(231, 231, 231) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(labelCycle).addComponent(labelExplored, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(labelExploredUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(labelCycleUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(labelAvgCycle, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(labelAvgCycleUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(65, 65, 65) .addComponent(toggleEnv, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(toggleHierarchy, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(buttonData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(46, 89, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false).addComponent( panelExploration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(scrollPaneRobots, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(labelCycleUpdate).addComponent(labelCycle)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(labelExploredUpdate) .addComponent(labelExplored)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(labelAvgCycleUpdate) .addComponent(labelAvgCycle))) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(buttonStop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( buttonStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(buttonStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(labelSpeed) .addComponent(sliderSpeed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(buttonData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(toggleHierarchy, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(toggleEnv, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); pack(); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAttachmentTagListJPanel.java
public CFAccSwingAttachmentTagListJPanel(ICFAccSwingSchema argSchema, ICFAccAttachmentObj argContainer, ICFAccAttachmentTagObj argFocus, Collection<ICFAccAttachmentTagObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();// w w w .j a v a2s . c om final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAccountContactListJPanel.java
public CFAccSwingAccountContactListJPanel(ICFAccSwingSchema argSchema, ICFAccAccountObj argContainer, ICFAccAccountContactObj argFocus, Collection<ICFAccAccountContactObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();/*from ww w. j a va2 s.c om*/ final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingSecGroupMemberListJPanel.java
public CFAccSwingSecGroupMemberListJPanel(ICFAccSwingSchema argSchema, ICFAccSecGroupObj argContainer, ICFAccSecGroupMemberObj argFocus, Collection<ICFAccSecGroupMemberObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();/*from w w w. j ava 2s . c o m*/ final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstSwing.CFAstSwingSecGroupMemberListJPanel.java
public CFAstSwingSecGroupMemberListJPanel(ICFAstSwingSchema argSchema, ICFAstSecGroupObj argContainer, ICFAstSecGroupMemberObj argFocus, Collection<ICFAstSecGroupMemberObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();//from w w w .ja v a 2 s . co m final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmSwing.CFCrmSwingMinorVersionListJPanel.java
public CFCrmSwingMinorVersionListJPanel(ICFCrmSwingSchema argSchema, ICFCrmMajorVersionObj argContainer, ICFCrmMinorVersionObj argFocus, Collection<ICFCrmMinorVersionObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();//ww w .ja v a 2s . com final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingTSecGroupMemberListJPanel.java
public CFAccSwingTSecGroupMemberListJPanel(ICFAccSwingSchema argSchema, ICFAccTSecGroupObj argContainer, ICFAccTSecGroupMemberObj argFocus, Collection<ICFAccTSecGroupMemberObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();//from w w w . jav a 2 s.c o m final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstSwing.CFAstSwingTSecGroupMemberListJPanel.java
public CFAstSwingTSecGroupMemberListJPanel(ICFAstSwingSchema argSchema, ICFAstTSecGroupObj argContainer, ICFAstTSecGroupMemberObj argFocus, Collection<ICFAstTSecGroupMemberObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();//from w w w. j a v a2 s .c o m final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingDomainListJPanel.java
public CFAsteriskSwingDomainListJPanel(ICFAsteriskSwingSchema argSchema, ICFInternetDomainBaseObj argContainer, ICFInternetDomainObj argFocus, Collection<ICFInternetDomainObj> argDataCollection, ICFJRefreshCallback refreshCallback, boolean sortByChain) { super();/*from w ww.jav a 2s . c o m*/ final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; swingFocus = argFocus; swingContainer = argContainer; swingRefreshCallback = refreshCallback; swingSortByChain = sortByChain; setSwingDataCollection(argDataCollection); dataTable = new JTable(getDataModel(), getDataColumnModel(), getDataListSelectionModel()); dataTable.addMouseListener(getDataListMouseAdapter()); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); dataTable.setUpdateSelectionOnSort(true); dataTable.setRowHeight(25); getDataListSelectionModel().addListSelectionListener(getDataListSelectionListener()); dataScrollPane = new JScrollPane(dataTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); dataScrollPane.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension sz = super.getPreferredSize(); sz.height = 25; return (sz); } }); dataTable.setFillsViewportHeight(true); // Do initial layout setSize(1024, 480); JMenuBar menuBar = getPanelMenuBar(); add(menuBar); menuBar.setBounds(0, 0, 1024, 25); add(dataScrollPane); dataScrollPane.setBounds(0, 25, 1024, 455); adjustListMenuBar(); doLayout(); swingIsInitializing = false; }