private void refreshInfo() { int channelsCount = mModel.getChannelCount(); mChannelLabel.setVisible(channelsCount > 1); mChannelScrollBar.setVisible(channelsCount > 1); mChannelLabel.setText( String.format("Channel: %s / %s", mModel.getCurrentChannel() + 1, channelsCount)); mChannelScrollBar.setValue(mModel.getCurrentChannel()); mChannelScrollBar.setMaximum(channelsCount); int zPlanesCount = mModel.getZPlanesCount(); mZPlaneLabel.setVisible(zPlanesCount > 1); mZPlaneScrollBar.setVisible(zPlanesCount > 1); mZPlaneLabel.setText( String.format("Z plane: %s / %s", mModel.getCurrentZPlane() + 1, zPlanesCount)); mZPlaneScrollBar.setValue(mModel.getCurrentZPlane()); mZPlaneScrollBar.setMaximum(zPlanesCount); int timePointsCount = mModel.getTimePointCount(); mTimePointScrollBar.setVisible(timePointsCount > 1); mTimePointLabel.setVisible(timePointsCount > 1); mTimePointLabel.setText( String.format("Time point: %s / %s", mModel.getCurrentTimePoint() + 1, timePointsCount)); mTimePointScrollBar.setValue(mModel.getCurrentTimePoint()); mTimePointScrollBar.setMaximum(timePointsCount); }
/** Update all elements in the title bar. */ public void updateTitleBar() { // The view is in the main window if (frame == null) { closeButton.setVisible(!isMaximized()); windowButton.setVisible(false); // !isMaximized()); unwindowButton.setVisible(false); unwindowButton2.setVisible(false); maximizeButton.setVisible(isMaximized()); titleLabel.setVisible(true); } else { closeButton.setVisible(false); unwindowButton.setVisible(true); unwindowButton2.setVisible(true); windowButton.setVisible(false); maximizeButton.setVisible(false); titleLabel.setVisible(false); } if (isMaximized()) { maximizeButton.setIcon(app.getScaledIcon("view-unmaximize.png")); } else { maximizeButton.setIcon(app.getScaledIcon("view-maximize.png")); } updateLabels(); }
@Override protected List<ParameterType> getProperties() { List<ParameterType> visible = new LinkedList<ParameterType>(); int hidden = 0; if (operator != null) { for (ParameterType type : operator.getParameters().getParameterTypes()) { if (type.isHidden()) { continue; } if (!isExpertMode() && type.isExpert()) { hidden++; continue; } visible.add(type); } } if (hidden > 0) { expertModeHintLabel.setText(hidden + " hidden expert parameter" + (hidden == 1 ? "" : "s")); expertModeHintLabel.setVisible(true); } else { expertModeHintLabel.setVisible(false); } return visible; }
@Override public void reset(@NotNull HttpConfigurable settings) { myNoProxyRb.setSelected(true); // default myAutoDetectProxyRb.setSelected(settings.USE_PROXY_PAC); myPacUrlCheckBox.setSelected(settings.USE_PAC_URL); myPacUrlTextField.setText(settings.PAC_URL); myUseHTTPProxyRb.setSelected(settings.USE_HTTP_PROXY); myProxyAuthCheckBox.setSelected(settings.PROXY_AUTHENTICATION); enableProxy(settings.USE_HTTP_PROXY); myProxyLoginTextField.setText(settings.getProxyLogin()); myProxyPasswordTextField.setText(settings.getPlainProxyPassword()); myProxyPortTextField.setNumber(settings.PROXY_PORT); myProxyHostTextField.setText(settings.PROXY_HOST); myProxyExceptions.setText(StringUtil.notNullize(settings.PROXY_EXCEPTIONS)); myRememberProxyPasswordCheckBox.setSelected(settings.KEEP_PROXY_PASSWORD); mySocks.setSelected(settings.PROXY_TYPE_IS_SOCKS); myHTTP.setSelected(!settings.PROXY_TYPE_IS_SOCKS); boolean showError = !StringUtil.isEmptyOrSpaces(settings.LAST_ERROR); myErrorLabel.setVisible(showError); myErrorLabel.setText(showError ? errorText(settings.LAST_ERROR) : null); final String oldStyleText = CommonProxy.getMessageFromProps(CommonProxy.getOldStyleProperties()); myOtherWarning.setVisible(oldStyleText != null); if (oldStyleText != null) { myOtherWarning.setText(oldStyleText); myOtherWarning.setIcon(Messages.getWarningIcon()); } }
private void updateCompare(final boolean saveIndex) { if (isColumnCompare()) { // Column jText.setVisible(false); jCompareColumn.setVisible(true); jDate.setVisible(false); jSpacing.setVisible(true); } else if (isDateCompare()) { // Date jText.setVisible(false); jCompareColumn.setVisible(false); jDate.setVisible(true); jSpacing.setVisible(true); } else { // String jText.setVisible(true); jCompareColumn.setVisible(false); jDate.setVisible(false); jSpacing.setVisible(false); } Object object = jCompareColumn.getSelectedItem(); List<EnumTableColumn<E>> compareColumns; if (isNumericCompare()) { compareColumns = new ArrayList<EnumTableColumn<E>>(numericColumns); } else if (isDateCompare()) { compareColumns = new ArrayList<EnumTableColumn<E>>(dateColumns); } else { compareColumns = new ArrayList<EnumTableColumn<E>>(filterControl.getColumns()); } jCompareColumn.setModel(new ListComboBoxModel<EnumTableColumn<E>>(compareColumns)); for (Object column : compareColumns) { if (column.equals(object) && saveIndex) { jCompareColumn.setSelectedItem(column); } } }
private void init() { this.setMinimumSize(new Dimension(360, 200)); this.setPreferredSize(new Dimension(360, 200)); this.setSize(new Dimension(360, 200)); setUndecorated(true); lblTitle.setSize(new java.awt.Dimension(360, 20)); lblTitle.setLocation(new java.awt.Point(20, 20)); lblTitle.setVisible(true); Font bigFont = new Font(lblTitle.getFont().getName(), Font.BOLD, TITLE_FONT_SIZE); Font smallFont = new Font(lblTitle.getFont().getName(), Font.PLAIN, OTHER_FONT_SIZE); lblTitle.setFont(bigFont); lblTitle.setText("Processing ..."); lblNote.setSize(new java.awt.Dimension(360, 20)); lblNote.setLocation(new java.awt.Point(20, 60)); lblNote.setVisible(true); lblNote.setFont(smallFont); jpbProgressBar.setValue(0); jpbProgressBar.setSize(new Dimension(230, 20)); jpbProgressBar.setLocation(new java.awt.Point(60, 100)); jpbProgressBar.setStringPainted(true); jpbProgressBar.setString(""); jpbProgressBar.setIndeterminate(true); jpbProgressBar.setVisible(true); btnCancel.setSize(new java.awt.Dimension(90, 30)); btnCancel.setLocation(new java.awt.Point(135, 140)); btnCancel.setVisible(true); pnlContent.setLayout(null); pnlContent.add(lblTitle); pnlContent.add(lblNote); pnlContent.add(jpbProgressBar); pnlContent.add(btnCancel); pnlContent.setPreferredSize(new Dimension(360, 160)); pnlContent.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1)); getContentPane().add(pnlContent, BorderLayout.CENTER); setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent we) { btnCancel.doClick(); } }); btnCancel.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { lblNote.setText("Cancelling..."); PromptListenerManager.fireTaskComplete(true); } }); }
private void checkSeek() { boolean seek = CHK_seek.isSelected(); SELECT_seekType.setVisible(seek); TEXT_seekPos.setVisible(seek); LABEL_seekPos.setVisible(seek); LABEL_seekType.setVisible(seek); LABEL_seek.setVisible(seek); }
public void showInstructions() { if (instructions != null) { instructionsLabel.setText(instructions); instructionsLabel.setVisible(true); } else { instructionsLabel.setVisible(false); } }
/** * To set the visibility of specific components in this class. * * @param isVisible whether to show or hide the specific components */ private void setComponentsVisibility(boolean isVisible) { currentPageLabel.setVisible(isVisible); totalPageLabel.setVisible(isVisible); ofLabel.setVisible(isVisible); prevPageButton.setVisible(isVisible); nextPageButton.setVisible(isVisible); pageLabel.setVisible(isVisible); pageLabel2.setVisible(isVisible); }
@Override public void filmSuccesfullyRated(FichaPelicula film) { this.setFilm(film); boolean flag = !film.getNotaUsuario().equals("-1"); yourMarkLabel.setVisible(flag); usersMarkFrame.setVisible(flag); usersMarkLabel.setText(film.getNotaUsuario()); usersMarkLabel.setVisible(flag); }
/** * Listens to property fired by the <code>StatusLabel</code>. * * @see PropertyChangeListener#propertyChange(PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (StatusLabel.FILES_SET_PROPERTY.equals(name)) { if (isCancelled()) { statusLabel.setText(CANCEL_TEXT); busyLabel.setBusy(false); busyLabel.setVisible(false); return; } Map<File, StatusLabel> files = (Map<File, StatusLabel>) evt.getNewValue(); insertFiles((Map<File, StatusLabel>) evt.getNewValue()); firePropertyChange(IMPORT_FILES_NUMBER_PROPERTY, null, files.size()); } else if (StatusLabel.FILE_IMPORT_STARTED_PROPERTY.equals(name)) { StatusLabel sl = (StatusLabel) evt.getNewValue(); if (sl == statusLabel && busyLabel != null) { busyLabel.setBusy(true); busyLabel.setVisible(true); cancelButton.setVisible(sl.isCancellable()); } } else if (StatusLabel.CANCELLABLE_IMPORT_PROPERTY.equals(name)) { StatusLabel sl = (StatusLabel) evt.getNewValue(); cancelButton.setVisible(sl.isCancellable()); } else if (StatusLabel.FILE_IMPORTED_PROPERTY.equals(name)) { Object[] results = (Object[]) evt.getNewValue(); File f = (File) results[0]; if (f.getAbsolutePath().equals(file.getAbsolutePath())) { setStatus(false, results[1]); if (f.isFile()) { if (hasImportFailed()) firePropertyChange(IMPORT_STATUS_CHANGE_PROPERTY, null, FAILURE); else if (isCancelled()) firePropertyChange(IMPORT_STATUS_CHANGE_PROPERTY, null, PARTIAL); else firePropertyChange(IMPORT_STATUS_CHANGE_PROPERTY, null, SUCCESS); } } } else if (StatusLabel.FILE_RESET_PROPERTY.equals(name)) { file = (File) evt.getNewValue(); fileNameLabel.setText(file.getName()); } else if (ThumbnailLabel.BROWSE_PLATE_PROPERTY.equals(name)) { firePropertyChange(BROWSE_PROPERTY, evt.getOldValue(), evt.getNewValue()); } else if (StatusLabel.CONTAINER_FROM_FOLDER_PROPERTY.equals(name)) { containerFromFolder = (DataObject) evt.getNewValue(); if (containerFromFolder instanceof DatasetData) { containerLabel.setText(TEXT_IMPORTED); browseButton.setText(((DatasetData) containerFromFolder).getName()); containerObject = containerFromFolder; } else if (containerFromFolder instanceof ScreenData) { containerLabel.setText(TEXT_IMPORTED); browseButton.setText(((ScreenData) containerFromFolder).getName()); containerObject = containerFromFolder; } } else if (StatusLabel.NO_CONTAINER_PROPERTY.equals(name)) { containerLabel.setText(""); noContainer = true; } else if (StatusLabel.DEBUG_TEXT_PROPERTY.equals(name)) { firePropertyChange(name, evt.getOldValue(), evt.getNewValue()); } }
void updateStatus() { myStatusLabel.setVisible(false); if (myInplaceTransform.isSelected() && mySaveTransientModelsCheckBox.isSelected()) { myStatusLabel.setText( "Warning: using in-place together with transient models may slow down generation process significantly"); myStatusLabel.setBackground(Color.yellow.brighter()); myStatusLabel.setOpaque(true); myStatusLabel.setVisible(true); } }
private void updateGUI() { isUpdating = true; ckManual.setSelected(settings.useManualClasses); rbFreq.setSelected(settings.frequencyType == StatPanelSettings.TYPE_COUNT); rbRelative.setSelected(settings.frequencyType == StatPanelSettings.TYPE_RELATIVE); rbNormalized.setSelected(settings.frequencyType == StatPanelSettings.TYPE_NORMALIZED); rbLeftRule.setSelected(settings.isLeftRule); ckCumulative.setSelected(settings.isCumulative); ckOverlayNormal.setSelected(settings.hasOverlayNormal); ckOverlayPolygon.setSelected(settings.hasOverlayPolygon); ckShowGrid.setSelected(settings.showGrid); ckAutoWindow.setSelected(settings.isAutomaticWindow); ckShowFrequencyTable.setSelected(settings.showFrequencyTable); lblYMin.setVisible(showYSettings); fldYMin.setVisible(showYSettings); lblYMax.setVisible(showYSettings); fldYMax.setVisible(showYSettings); lblYInterval.setVisible(showYSettings); fldYInterval.setVisible(showYSettings); // enable/disable window dimension components dimPanel.setEnabled(!ckAutoWindow.isSelected()); fldXMin.setEnabled(!ckAutoWindow.isSelected()); fldXMax.setEnabled(!ckAutoWindow.isSelected()); fldXInterval.setEnabled(!ckAutoWindow.isSelected()); fldYMin.setEnabled(!ckAutoWindow.isSelected()); fldYMax.setEnabled(!ckAutoWindow.isSelected()); fldYInterval.setEnabled(!ckAutoWindow.isSelected()); lblXMin.setEnabled(!ckAutoWindow.isSelected()); lblXMax.setEnabled(!ckAutoWindow.isSelected()); lblXInterval.setEnabled(!ckAutoWindow.isSelected()); lblYMin.setEnabled(!ckAutoWindow.isSelected()); lblYMax.setEnabled(!ckAutoWindow.isSelected()); lblYInterval.setEnabled(!ckAutoWindow.isSelected()); // enable/disable normal overlay option ckOverlayNormal.setEnabled(settings.frequencyType == StatPanelSettings.TYPE_NORMALIZED); if (ckAutoWindow.isSelected()) { fldXMin.setText("" + statDialog.format(settings.xMin)); fldXMax.setText("" + statDialog.format(settings.xMax)); fldYMin.setText("" + statDialog.format(settings.yMin)); fldYMax.setText("" + statDialog.format(settings.yMax)); } isUpdating = false; repaint(); }
/** Affiche certains messages d'erreur si besoin */ private void showErrorMsg(controller.Inscription inscription) { if (inscription.errorLogin) { errorLogin.setVisible(true); } if (inscription.errorDuplicateLogin) { errorLogin.setVisible(true); } if (inscription.errorPassword) { errorPass1.setVisible(true); } if (inscription.errorPassword2) { errorPass2.setVisible(true); } if (inscription.errorEmail) { errorEmail.setVisible(true); } if (inscription.errorTel) { errorTel.setVisible(true); } if (inscription.errorAdresse) { errorAdresse.setVisible(true); } if (inscription.errorNom) { errorNom.setVisible(true); } if (inscription.errorPrenom) { errorPrenom.setVisible(true); } }
private void hideBootstrapOptions() { _bootstrap_rnd_seed_label.setVisible(false); _bootstrap_rnd_seed_textfield.setVisible(false); _bootstrap_rnd_seed_textfield.setText("1234"); _bootstrap_samples_label.setVisible(false); _bootstrap_samples_textfield.setVisible(false); _bootstrap_samples_textfield.setText("100"); _parameters.put(_use_bootstrap, null); _parameters.put(_random_seed, null); _parameters.put(_samples, null); }
public void checkConditions() { btnCreate.setEnabled(false); lblErrorLabel.setVisible(true); if (textName.getText().equals("")) { lblErrorLabel.setText("Enter callback name."); return; } btnCreate.setEnabled(true); lblErrorLabel.setVisible(false); }
private void updateUIData(SearchResultActionsHolder value, JTable table, int row, int column) { actionsHolder = value; searchResult = actionsHolder.getSearchResult(); showSolid = mouseIsOverRow(table, row); updatePlayButton(); labelPlay.setVisible(isSearchResultPlayable()); labelDownload.setIcon(showSolid ? download_solid : download_transparent); labelDownload.setVisible(true); labelPartialDownload.setIcon(showSolid ? details_solid : details_transparent); labelPartialDownload.setVisible( searchResult.getSearchResult() instanceof CrawlableSearchResult); }
public void askDifficulty() { // hides everything but the things needed to be on the screen started = false; playing = false; instructionLabel.setVisible(true); difficultyLabel.setVisible(true); exitButton.setVisible(true); exitButton.setLocation((bWidth * 4) + 200, 450); for (int i = 0; i < 4; i++) { switch (i) { case (0): difficultyButton[i].setText("Easy"); break; case (1): difficultyButton[i].setText("Medium"); break; case (2): difficultyButton[i].setText("Hard"); break; case (3): difficultyButton[i].setText("Insane"); break; } difficultyButton[i].setVisible(true); } for (int i = 0; i < projectileAmount; i++) { enemyProj[i].setVisible(false); } for (int i = 0; i < livesImages.length; i++) { livesImages[i].setVisible(false); } playerLabel.setVisible(false); scoreLabel.setVisible(false); playerProj.setVisible(false); resetButton.setVisible(false); player.setVisible(false); outcomeLabel.setVisible(false); tickLabel.setVisible(false); shield.setVisible(false); ceiling.setVisible(false); floor.setVisible(false); for (int y = 0; y < 4; y++) { for (int x = 0; x < 10; x++) { enemies[y][x].setVisible(false); } } }
public void save() { boolean isNoticed = false; if (!notice.isVisible()) { isNoticed = true; notice.setVisible(true); notice.setText("Saving..."); } if (getOptions() != null) { DB database = null; try { database = factory.open(this.leveldbStore.getSelectedFile(), getOptions()); DBIterator iterator = database.iterator(); HashSet<byte[]> keys = new HashSet<>(); for (iterator.seekToFirst(); iterator.hasNext(); iterator.next()) { keys.add(iterator.peekNext().getKey()); } iterator.close(); for (byte[] key : keys) { database.delete(key); } for (int i = 0; i < dataList.getModel().getSize(); ++i) { DBItem item = dataList.getModel().getElementAt(i); database.put(item.key, item.value); } } catch (Exception e) { JOptionPane.showMessageDialog(pane, "Unable to open database:\n" + e); e.printStackTrace(); } finally { if (database != null) { try { database.close(); } catch (IOException e) { JOptionPane.showMessageDialog(pane, "Unable to close database:\n" + e); e.printStackTrace(); } } saveButton.setEnabled(false); } } if (isNoticed) { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } notice.setVisible(false); notice.setText(""); } }
public static void refreshPatientData() { Measurements data = BrainFreezeMain.patients.get(BrainFreezeMain.currentPatientIndex).getData(); if (data.isValid()) { resultChoiceList.setVisible(true); // we have valid data, show options for representation noDataText.setVisible(false); collectDataButton.setVisible(false); // Nothing chosen by definition, put up message RightPanel.swapRepresentation("ChooseSomethingMessage"); resultChoiceList.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @SuppressWarnings("unchecked") JComboBox<String> cb = (JComboBox<String>) e.getSource(); String chosenRepresentation = (String) cb.getSelectedItem(); RightPanel.swapRepresentation(chosenRepresentation); } }); collectDataButton.setVisible(true); collectDataButton.setText("Retake Exam"); RightPanel.swapRepresentation( "~~"); // remove any graphs that may be there, this is a new patient with no valid data initComboBox(0); collectDataButton.removeActionListener(startExamListener); collectDataButton.addActionListener(retakeListener); } else { resultChoiceList.setVisible(false); // we have no valid data noDataText.setVisible(true); collectDataButton.setVisible(true); collectDataButton.setText("Begin Examination"); RightPanel.swapRepresentation( "~~"); // remove any graphs that may be there, this is a new patient with no valid data collectDataButton.removeActionListener(retakeListener); collectDataButton.addActionListener(startExamListener); } editPatientInfoButton.addActionListener(editPatientInfoListener); editPatientInfoButton.setVisible(true); }
public void updateAdvancedOptionsStatus(boolean b) { jPanelReturnType.setVisible(b); jLabelAdv1.setVisible(b); jLabelAdv2.setVisible(b); jComboBoxType1.setVisible(b); jComboBoxType2.setVisible(b); if (b) { jToggleButton1.setText(I18n.getString("FewerOptions", "Fewer options")); } else { jToggleButton1.setText(I18n.getString("MoreOptions", "More options")); } }
/** Descripción de Método */ private void enableNew() { boolean sel = fCreateNew.isSelected(); lWarehouse.setVisible(sel); fWarehouse.setVisible(sel); lWarehouseInfo.setVisible(!sel); fWarehouseInfo.setVisible(!sel); fX.setReadWrite(sel); fY.setReadWrite(sel); fZ.setReadWrite(sel); fValue.setReadWrite(sel); pack(); } // enableNew
public void setScores() { p1Stats.setForeground(Color.white); p2Stats.setForeground(Color.white); p1Stats.setText("Player 1| Wins: " + TTTMain.p1WinCount + " Loss: " + TTTMain.p1LossCount); p2Stats.setText("Player 2| Wins: " + TTTMain.p2WinCount + " Loss: " + TTTMain.p2LossCount); if (p1.isSelected()) { TTTMain.aiEnabled = true; p2Stats.setVisible(false); } else if (p2.isSelected()) { TTTMain.aiEnabled = false; p2Stats.setVisible(true); } }
private void checkVisibilityOfSmtpAuth() { boolean val = cb_smtp_auth.isSelected(); lb_smtpUser.setVisible(val); tf_smtpUser.setVisible(val); lb_smtpPW.setVisible(val); pf_smtpPW.setVisible(val); cb_pwSave.setVisible(val); if (!val) { tf_smtpUser.setText(""); pf_smtpPW.setText(""); cb_pwSave.setSelected(false); } repaint(); }
public MainWindow(Controller c) { super("Voltage to Acceleration Converter"); controller = c; setContentPane(rootPanel); pack(); performConversionButton.setEnabled(false); loadedRowsData.setVisible(false); loadedColumnsData.setVisible(false); loadedRowsCoefs.setVisible(false); loadedMeasurements.setVisible(false); openCoefButton.setEnabled(false); performConversionButton.setEnabled(false); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); openDataFileButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { JFileChooser loadFile = new JFileChooser("src/test/resources/"); loadFile.showOpenDialog(null); loadFilePath = loadFile.getSelectedFile().getAbsolutePath(); openCoefButton.setEnabled(true); } }); openCoefButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { JFileChooser loadFile = new JFileChooser("src/test/resources/"); loadFile.showOpenDialog(null); coefFilePath = loadFile.getSelectedFile().getAbsolutePath(); performConversionButton.setEnabled(true); } }); performConversionButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { JFileChooser saveFile = new JFileChooser("src/test/resources/"); saveFile.showSaveDialog(null); saveFilePath = saveFile.getSelectedFile().getAbsolutePath(); if (!saveFilePath.isEmpty()) { controller.convertLineByLine(loadFilePath, coefFilePath, saveFilePath); } } }); setVisible(true); }
private void setRdbtn(boolean isSelectByName) { if (isSelectByName) { lblStartcol.setVisible(false); lblEndcol.setVisible(false); spinStart.setVisible(false); spinEnd.setVisible(false); lblLncidcol.setText("LncIDCol"); } else { lblStartcol.setVisible(true); lblEndcol.setVisible(true); spinStart.setVisible(true); spinEnd.setVisible(true); lblLncidcol.setText("ChrIDCol"); } }
/** * DOCUMENT ME! * * @param vali DOCUMENT ME! */ public void reSetValidator(final Validatable vali) { if (vali == null) { log.warn("VALI == NULL"); iconContainer.setVisible(false); } else { this.vali = vali; comp.remove(iconContainer); iconContainer.setVisible(true); comp.setLayout(new java.awt.BorderLayout()); comp.add(iconContainer, java.awt.BorderLayout.EAST); vali.addValidationStateChangedListener(this); // TODO SIGNATURE CHANGED -- UGLY better possibilites ?? validationStateChanged(null); } }
private JPanel initComponents() { // pane with null layout JPanel contentPane = new JPanel(null); contentPane.setBackground(new Color(200, 200, 200)); initButton1(); initButton2(); initButton3(); initButton4(); initButton5(); initButton6(); initButton7(); initButton8(); // initButton9(); JLabel label1 = new JLabel(); label1.setBounds(115, 45, 200, 50); label1.setBackground(new Color(214, 217, 223)); label1.setForeground(new Color(0, 0, 0)); label1.setEnabled(true); label1.setFont(new Font("SansSerif", 1, 20)); label1.setText("MENU"); label1.setVisible(true); JLabel label2 = new JLabel(); label2.setBounds(125, 10, 50, 50); label2.setBackground(new Color(214, 217, 223)); label2.setForeground(new Color(0, 0, 0)); label2.setEnabled(true); label2.setFont(new Font("SansSerif", 1, 14)); label2.setText("PT_SP"); label2.setVisible(true); // adding components to contentPane panel contentPane.add(button1); contentPane.add(button2); contentPane.add(button3); contentPane.add(button4); contentPane.add(button5); contentPane.add(button6); contentPane.add(button7); contentPane.add(button8); // contentPane.add(button9); contentPane.add(label1); contentPane.add(label2); return contentPane; }
protected JComponent createCenterPanel() { final VirtualFile[] sourceRoots = getSourceRoots(); boolean isDestinationVisible = sourceRoots.length > 1; myDestinationFolderCB.setVisible(isDestinationVisible); myTargetDestinationLabel.setVisible(isDestinationVisible); return null; }
public LabeledSlider( int min, int max, int moltiplier, int val, String name, int width, int height, ChangeListener ext) { super(min, max * moltiplier); setPreferredSize(new Dimension(width, height)); putClientProperty("JSlider.isFilled", Boolean.TRUE); slide = new JLabel(""); add(slide); slide.setVisible(true); slide.setForeground(Color.BLACK); setMajorTickSpacing(max); putClientProperty("JSlider.isFilled", Boolean.TRUE); // setPaintTicks(true); // setPaintLabels(true); setName(name); setValue(val); addChangeListener(this); addChangeListener(ext); addAncestorListener(this); }