Refine search
private static Box getNewFilter() { Box filter = Box.createHorizontalBox(); FilterType[] filterTypeOptions = FilterType.values(); JComboBox filterTypes = new JComboBox(filterTypeOptions ); filterTypes.setEditable(false); filter.add(filterTypes); filter.add(Box.createHorizontalGlue()); JTextField filterInput = new JTextField(); //filterInput.setMaximumSize(new Dimension(50,50)); filterInput.setEditable(true); filter.add(filterInput); return filter; }
private JPanel createHeaderPanel() { JPanel headerPanel = new JPanel(new BorderLayout(20, 0)); JPanel planningWindowPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); planningWindowPanel.add(new JLabel("Planning window start:")); planningWindowStartField = new JTextField(10); planningWindowStartField.setEditable(false); planningWindowPanel.add(planningWindowStartField); advancePlanningWindowStartAction = new AbstractAction("Advance 1 day into the future") { @Override public void actionPerformed(ActionEvent e) { advancePlanningWindowStart(); } }; advancePlanningWindowStartAction.setEnabled(false); planningWindowPanel.add(new JButton(advancePlanningWindowStartAction)); headerPanel.add(planningWindowPanel, BorderLayout.WEST); JLabel shiftTypeExplanation = new JLabel("E = Early shift, L = Late shift, ..."); headerPanel.add(shiftTypeExplanation, BorderLayout.CENTER); return headerPanel; }
public void resetResourceListPanel() { if (resourceListPanel != null) { remove(resourceListPanel); } resourceListPanel = new JPanel(new GridLayout(1, resourceList.size())); resourceFieldMap = new LinkedHashMap<>(resourceList.size()); for (MrResource resource : resourceList) { long maximumCapacity = machine == null ? 0L : machine.getMachineCapacity(resource).getMaximumCapacity(); JTextField resourceField = new JTextField("0 / " + maximumCapacity); resourceFieldMap.put(resource, resourceField); resourceField.setEditable(false); resourceField.setEnabled(false); resourceListPanel.add(resourceField); } add(resourceListPanel, BorderLayout.CENTER); }
private JPanel createAssignmentsPanel() { JPanel assignmentsPanel = new JPanel(new GridLayout(0, resourceList.size())); int colorIndex = 0; for (MrProcessAssignment processAssignment : processAssignmentList) { JLabel processAssignmentLabel = new JLabel(processAssignment.getLabel()); processAssignmentLabel.setForeground(TangoColorFactory.SEQUENCE_1[colorIndex]); assignmentsPanel.add(processAssignmentLabel); for (MrResource resource : resourceList) { long usage = processAssignment.getProcess().getProcessRequirement(resource).getUsage(); JTextField resourceField = new JTextField(Long.toString(usage)); resourceField.setEditable(false); assignmentsPanel.add(resourceField); } colorIndex = (colorIndex + 1) % TangoColorFactory.SEQUENCE_1.length; } return assignmentsPanel; }
assignmentsPanel.add(labelAndDeletePanel); JTextField cpuPowerField = new JTextField(process.getRequiredCpuPower() + " GHz"); cpuPowerField.setEditable(false); assignmentsPanel.add(cpuPowerField); JTextField memoryField = new JTextField(process.getRequiredMemory() + " GB"); memoryField.setEditable(false); assignmentsPanel.add(memoryField); JTextField networkBandwidthField = new JTextField(process.getRequiredNetworkBandwidth() + " GB"); networkBandwidthField.setEditable(false); assignmentsPanel.add(networkBandwidthField); assignmentsPanel.add(cloudBalancingPanel.createButton(process));
cpuPowerField = new JTextField("0 GHz / " + getComputerCpuPower() + " GHz"); cpuPowerField.setEditable(false); cpuPowerField.setEnabled(false); add(cpuPowerField); memoryField = new JTextField("0 GB / " + getComputerMemory() + " GB"); memoryField.setEditable(false); memoryField.setEnabled(false); add(memoryField); networkBandwidthField = new JTextField("0 GB / " + getComputerNetworkBandwidth() + " GB"); networkBandwidthField.setEditable(false); networkBandwidthField.setEnabled(false); add(networkBandwidthField); costField = new JTextField(getComputerCost() + " $"); costField.setEditable(false); costField.setEnabled(false); add(costField);
public void addLabelAndSelectableLastField(String s, String value, Container parent) { addLabel(s, parent); JTextField field = new JTextField(value); field.setBorder(null); field.setOpaque(false); field.setEditable(false); addLastField(field, parent); } }
panel.add(nameLabel, c); String taskName = (String) workItem.getParameter("TaskName"); JTextField nameField = new JTextField( taskName == null ? "" : taskName); nameField.setEditable(false); c = new GridBagConstraints(); c.weightx = 1; panel.add(priorityLabel, c); String priority = (String) workItem.getParameter("Priority"); JTextField priorityField = new JTextField( priority == null ? "" : priority); priorityField.setEditable(false); c = new GridBagConstraints(); c.gridy = 1; c.insets = new Insets(5, 5, 5, 5); panel.add(label, c); JTextField field = new JTextField( workItem.getParameter(name).toString()); field.setEditable(false); c = new GridBagConstraints(); c.gridy = 2 + additionalParameters;
buttonPanel.add(indictmentHeatMapToggleButton); scorePanel.add(buttonPanel, BorderLayout.WEST); scoreField = new JTextField("Score:"); scoreField.setEditable(false); scoreField.setForeground(Color.BLACK); scoreField.setBorder(BorderFactory.createLoweredBevelBorder());
/** * Adds the given tree to the display without removing already * displayed trees * @param match tree to be added */ private void addMatch(TreeFromFile match, List<Tree> matchedParts) { JPanel treeDisplay = new JPanel(new BorderLayout()); JTextField filename = new JTextField("From file: " + match.getFilename()); filename.setEditable(false); MouseInputAdapter listener = new FilenameMouseInputAdapter(filename); filename.addMouseListener(listener); filename.addMouseMotionListener(listener); treeDisplay.add(filename, BorderLayout.NORTH); if(TregexGUI.getInstance().isTdiffEnabled()) { tjp = getTreeJPanel(match.getDiffDecoratedTree(), matchedParts); tjp.setDiffConstituents(match.getDiffConstituents()); } else { tjp = getTreeJPanel(match.getTree(), matchedParts); } matchedPartCoordinates = tjp.getMatchedPartCoordinates(); matchedPartCoordinateIdx = -1; treeDisplay.add(tjp, BorderLayout.CENTER); filename.setOpaque(true); filename.setBackground(tjp.getBackground()); filename.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); scroller.setViewportView(treeDisplay); this.revalidate(); this.repaint(); }
JTextField f=new JTextField("Hello World"); f.setEditable(false); content.add(f);
private void init() { panel = new JPanel(new BorderLayout()); statusField = new JTextField(); statusField.setEditable(false); panel.add(statusField); defaultBorder = new BevelBorder(BevelBorder.LOWERED); errorBorder = new BevelBorder(BevelBorder.LOWERED, Color.RED, Color.RED); statusField.setAction(textInputAction); tree.addTreeSelectionListener(this); }
public FileControl(String nodePath, Port port) { super(nodePath, port); setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0)); fileField = new JTextField(); fileField.putClientProperty("JComponent.sizeVariant", "small"); fileField.setPreferredSize(new Dimension(150, 19)); fileField.setEditable(false); fileField.setFont(Theme.SMALL_BOLD_FONT); chooseButton = new JButton("..."); chooseButton.putClientProperty("JButton.buttonType", "gradient"); chooseButton.setPreferredSize(new Dimension(30, 27)); chooseButton.addActionListener(this); add(fileField); add(chooseButton); setValueForControl(port.getValue()); }
fileField = new JTextField(20); fileField.setEditable(false); filePanel.add(fileField); JButton chooseButton = new JButton("..."); fromField = new JTextField("1", 5); rangePanel.add(fromField); rangePanel.add(new JLabel("To:")); toField = new JTextField("100", 5); rangePanel.add(toField); mainPanel.add(rangePanel);
prefixField = new JTextField("export", 20); prefixPanel.add(prefixField); mainPanel.add(prefixPanel); directoryField = new JTextField(20); directoryField.setEditable(false); directoryPanel.add(directoryField); JButton chooseButton = new JButton("..."); fromField = new JTextField("1", 5); rangePanel.add(fromField); rangePanel.add(new JLabel("To:"));
south.add(filenameField = new JTextField(), CENTER); south.add(defaultButton = new JButton(), EAST); add(south); filenameField.setEditable(false); filenameField.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); filenameField.addMouseListener(new MouseAdapter() {
page.add(processList); descLabel = new JTextField(defaultDesc, 35); descLabel.setEditable(false); Border border = new LineBorder(this.getPanel().getBackground(), 0); descLabel.setBorder(border);
txtName.setEditable(false); txtName.setHorizontalAlignment(javax.swing.JTextField.LEFT); txtName.setBorder(javax.swing.BorderFactory.createEtchedBorder()); txtName.addActionListener(evt -> txtNameActionPerformed(evt)); txtType.setEditable(false); txtType.setHorizontalAlignment(javax.swing.JTextField.LEFT); txtType.setBorder(javax.swing.BorderFactory.createEtchedBorder()); txtType.setRequestFocusEnabled(false); txtStartTime.setEditable(false); txtStartTime.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtStartTime.setBorder(javax.swing.BorderFactory.createEtchedBorder()); txtStartTime.setRequestFocusEnabled(false); txtEndTime.setEditable(false); txtEndTime.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtEndTime.setBorder(javax.swing.BorderFactory.createEtchedBorder()); txtEndTime.setRequestFocusEnabled(false); txtTournamentState.setEditable(false); txtTournamentState.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtTournamentState.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jPanel1 = new javax.swing.JPanel(); bigCard = new mage.client.cards.BigCard(); txtDeckName = new javax.swing.JTextField(); lblDeckName = new javax.swing.JLabel(); btnSave = new javax.swing.JButton(); btnAddLand = new javax.swing.JButton(); btnGenDeck = new javax.swing.JButton(); txtTimeRemaining = new javax.swing.JTextField(); btnGenDeck.setName("btnGenDeck"); btnGenDeck.addActionListener(evt -> btnGenDeckActionPerformed(evt)); txtTimeRemaining.setEditable(false); txtTimeRemaining.setForeground(java.awt.Color.red); txtTimeRemaining.setHorizontalAlignment(javax.swing.JTextField.CENTER);
filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.X_AXIS)); fileNameField = new JTextField(100); fileNameField.setText(new File(getFileName()).getName()); fileNameField.setEditable(false); fileNameField.setPreferredSize(new Dimension(100, fileNameField.getHeight()));