List of usage examples for java.lang Float valueOf
@HotSpotIntrinsicCandidate public static Float valueOf(float f)
From source file:org.wildfly.test.integration.microprofile.config.smallrye.app.MicroProfileConfigTestCase.java
/** * Check float/Float type is correctly handled in regards of the default values, no default values and if it is * overridden.//from ww w. ja v a2s. com * * @throws Exception */ @Test public void testGetFloatProperties() throws Exception { try (CloseableHttpClient client = HttpClientBuilder.create().build()) { HttpResponse response = client.execute(new HttpGet(url + appContext + TestApplication.FLOAT_APP_PATH)); Assert.assertEquals(200, response.getStatusLine().getStatusCode()); String text = getContent(response); assertTextContainsProperty(text, "floatDefault", -3.14); assertTextContainsProperty(text, SubsystemConfigSourceTask.FLOAT_OVERRIDDEN_PROP_NAME, SubsystemConfigSourceTask.FLOAT_OVERRIDDEN_PROP_VALUE); assertTextContainsProperty(text, "floatClassDefault", Float.valueOf("-3.14e10")); assertTextContainsProperty(text, SubsystemConfigSourceTask.FLOAT_CLASS_OVERRIDDEN_PROP_NAME, SubsystemConfigSourceTask.FLOAT_OVERRIDDEN_PROP_VALUE); assertTextContainsProperty(text, "floatBadValue", 0.0f); assertTextContainsProperty(text, "floatClassBadValue", "null"); } }
From source file:hsa.awp.usergui.FlatListPanel.java
/** * Constructor for the FlatList panel, which defines all needed components. * * @param id ID which declares the location in the markup. *//*from w w w .java2 s .c o m*/ public FlatListPanel(String id, final Campaign campaign) { super(id); final FifoProcedure procedure = getCurrentFifoProcedure(campaign); singleUser = controller.getUserById(SecurityContextHolder.getContext().getAuthentication().getName()); // find events where user is allowed events = controller.getEventsWhereRegistrationIsAllowed(campaign, singleUser); // find categories with events where user is allowed categories = getCategoriesOfEvents(events); // find events of category where user is allowed updateRegistrationInfo(campaign); final LoadableDetachedModel<List<Category>> categoriesModel = new LoadableDetachedModel<List<Category>>() { /** * unique serialization id. */ private static final long serialVersionUID = 1594571791900639307L; @Override protected List<Category> load() { List<Category> categoryList = new ArrayList<Category>(categories); Collections.sort(categoryList, EventSorter.alphabeticalCategoryName()); return categoryList; } }; final WebMarkupContainer flatListContainer = new WebMarkupContainer("flatlist.container"); flatListContainer.setOutputMarkupId(true); flatListContainer.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(30f))); add(flatListContainer); add(new Label("flatlist.capacityDE", new Model<Integer>((int) (capacityPercent * 100)))); add(new Label("flatlist.capacityEN", new Model<Integer>((int) (capacityPercent * 100)))); flatListContainer.add(new ListView<Category>("categorylist", categoriesModel) { /** * Generated serialization id. */ private static final long serialVersionUID = 490760462608363776L; @Override protected void populateItem(ListItem<Category> item) { List<Event> eventsOfCategory = getEventsOfCategory(item.getModelObject(), events); item.add(new Label("categoryname", item.getModelObject().getName())); item.add(new ListView<Event>("eventlist", eventsOfCategory) { /** * Generated serialization id. */ private static final long serialVersionUID = 497760462608363776L; @SuppressWarnings("serial") @Override protected void populateItem(final ListItem<Event> item) { final Event event = item.getModelObject(); int maxParticipants = event.getMaxParticipants(); long participantCount = controller.countConfirmedRegistrationsByEventId(event.getId()); if (participantCount > maxParticipants) { participantCount = maxParticipants; } item.add(new Label("eventNumber", formatEventId(event))); item.add(new Label("subjectname", event.getSubject().getName())); item.add(new Label("eventdescription", formatDetailInformation(event))); Link<Object> link = new Link<Object>("submited") { public void onClick() { FifoProcedure fifo = getCurrentFifoProcedure(campaign); String initiator = SecurityContextHolder.getContext().getAuthentication().getName(); try { controller.registerWithFifoProcedure(fifo, event, initiator, initiator, true); updateRegistrationInfo(campaign); } catch (MaximumAllowedRegistrationsExceededException e) { error("Maximale Registrierungen erreicht. / Maximum registrations reached."); } } }; Image icon = new Image("icon"); icon.add(new AttributeModifier("src", true, new Model<String>())); if ((maximumAllowedRegistrations > 0 && registrationsLeft <= 0) || controller.hasParticipantConfirmedRegistrationInEvent(singleUser, event)) { link.setVisible(false); item.add(new AttributeAppender("class", new Model<String>("disabled"), " ")); } String eventPlacesText = procedure.getDisplayMode() == FifoDisplayMode.FULL ? "(" + participantCount + "/" + maxParticipants + ")" : ""; item.add(new Label("eventplaces", eventPlacesText)); if ((maxParticipants - participantCount) <= 0) { link.setEnabled(false); item.add(new AttributeAppender("class", new Model<String>("disabled"), " ")); icon.add(new AttributeModifier("src", true, new Model<String>("images/red.png"))); } else if ((Float.valueOf(maxParticipants - participantCount) / maxParticipants) <= capacityPercent) { icon.add(new AttributeModifier("src", true, new Model<String>("images/yellow.png"))); } else { icon.add(new AttributeModifier("src", true, new Model<String>("images/green.png"))); } link.add(icon); link.add(new JavascriptEventConfirmation("onclick", "Sind Sie sicher?")); item.add(link); final ModalWindow detailWindow = new ModalWindow("detailWindow"); detailWindow.setTitle(new Model<String>("Veranstaltungsdetails")); detailWindow.setInitialWidth(450); item.add(detailWindow); item.add(new AjaxFallbackLink<Object>("infoLink") { /** * unique serialization id. */ private static final long serialVersionUID = 543607735730300949L; @Override public void onClick(AjaxRequestTarget target) { detailWindow.setContent(new EventDetailPanel(detailWindow.getContentId(), event)); detailWindow.show(target); } }); } }); } }); LoadableDetachedModel<String> dateModel = new LoadableDetachedModel<String>() { /** * unique serialization id. */ private static final long serialVersionUID = -3714278116173742179L; @Override protected String load() { DateFormat singleFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"); return singleFormat.format(Calendar.getInstance().getTime()); } }; flatListContainer.add(new Label("flatlist.date", dateModel)); flatListContainer.add(new AjaxFallbackLink<Object>("flatlist.refresh") { /** * unique serialization id. */ private static final long serialVersionUID = 8370439147861506762L; @Override public void onClick(AjaxRequestTarget target) { categoriesModel.detach(); target.addComponent(flatListContainer); } }); flatListContainer.add(new Label("flatlist.userInfo", new LoadableDetachedModel<String>() { @Override protected String load() { //Kampangenname: Phase: Phasenname vom xx.xx.xx. hh:mm bis xx.xx.xx hh:mm StringBuilder sb = new StringBuilder(); sb.append(campaign.getName()); sb.append(": Phase: "); Procedure currentProcedure = campaign.findCurrentProcedure(); sb.append(currentProcedure.getName()); sb.append(" vom "); DateFormat df = new SimpleDateFormat("dd.MM.yyyy HH:mm"); sb.append(df.format(currentProcedure.getStartDate().getTime())); sb.append(" bis "); sb.append(df.format(currentProcedure.getEndDate().getTime())); return sb.toString(); } })); WebMarkupContainer registrationInfoContainer = new WebMarkupContainer("flatlist.registrationInfo"); flatListContainer.add(registrationInfoContainer); registrationInfoContainer.setVisible(maximumAllowedRegistrations > 0); registrationInfoContainer .add(new Label("flatlist.registrationInfo.maximum", String.valueOf(maximumAllowedRegistrations))); registrationInfoContainer .add(new Label("flatlist.registrationInfo.alreadyUsed", new LoadableDetachedModel<String>() { @Override protected String load() { return String.valueOf(usedRegistrations); } })); registrationInfoContainer .add(new Label("flatlist.registrationInfo.registrationsLeft", new LoadableDetachedModel<String>() { @Override protected String load() { return String.valueOf(registrationsLeft); } })); feedbackPanel = new FeedbackPanel("feedbackPanel"); feedbackPanel.setOutputMarkupId(true); add(feedbackPanel); }
From source file:com.alibaba.dubbo.governance.web.common.module.screen.Restful.java
private static Object convertPrimitive(Class<?> cls, String value) { if (cls == boolean.class || cls == Boolean.class) { return value == null || value.length() == 0 ? false : Boolean.valueOf(value); } else if (cls == byte.class || cls == Byte.class) { return value == null || value.length() == 0 ? 0 : Byte.valueOf(value); } else if (cls == char.class || cls == Character.class) { return value == null || value.length() == 0 ? '\0' : value.charAt(0); } else if (cls == short.class || cls == Short.class) { return value == null || value.length() == 0 ? 0 : Short.valueOf(value); } else if (cls == int.class || cls == Integer.class) { return value == null || value.length() == 0 ? 0 : Integer.valueOf(value); } else if (cls == long.class || cls == Long.class) { return value == null || value.length() == 0 ? 0 : Long.valueOf(value); } else if (cls == float.class || cls == Float.class) { return value == null || value.length() == 0 ? 0 : Float.valueOf(value); } else if (cls == double.class || cls == Double.class) { return value == null || value.length() == 0 ? 0 : Double.valueOf(value); }//from w ww .java2 s . com return value; }
From source file:gov.nih.nci.caintegrator.web.action.query.form.FoldChangeCriterionWrapper.java
private TextFieldParameter createFoldsUpParameter() { final String label = RegulationTypeEnum.UNCHANGED.equals(criterion.getRegulationType()) ? "And" : "Up-regulation folds"; TextFieldParameter foldsParameter = new TextFieldParameter(getParameters().size(), getRow().getRowIndex(), criterion.getFoldsUp().toString()); foldsParameter.setLabel(label);//www .j av a 2 s. c o m ValueHandler foldsChangeHandler = new ValueHandlerAdapter() { @Override public boolean isValid(String value) { return NumberUtils.isNumber(value); } @Override public void validate(String formFieldName, String value, ValidationAware action) { if (!isValid(value)) { action.addActionError("Numeric value required for " + label); } } @Override public void valueChanged(String value) { criterion.setFoldsUp(Float.valueOf(value)); } }; foldsParameter.setValueHandler(foldsChangeHandler); return foldsParameter; }
From source file:ca.sqlpower.dao.json.SPJSONMessageDecoder.java
public static Object getWithType(@Nonnull JSONObject jo, DataType type, String propName) throws JSONException { if (getNullable(jo, propName) == null) return null; switch (type) { case BOOLEAN: return Boolean.valueOf(jo.getBoolean(propName)); case DOUBLE://from w w w .j a v a 2s . com return Double.valueOf(jo.getDouble(propName)); case INTEGER: return Integer.valueOf(jo.getInt(propName)); case LONG: return Long.valueOf(jo.getLong(propName)); case SHORT: return Short.valueOf(jo.getShort(propName)); case FLOAT: return Float.valueOf(jo.getFloat(propName)); case PNG_IMG: getNullable(jo, propName); String base64Data = jo.getString(propName); byte[] decodedBytes; try { decodedBytes = Base64.decodeBase64(base64Data.getBytes("ascii")); } catch (UnsupportedEncodingException e) { throw new RuntimeException("ASCII should always be supported!", e); } return new ByteArrayInputStream(decodedBytes); case NULL: case STRING: case REFERENCE: default: return getNullable(jo, propName); } }
From source file:at.salzburgresearch.kmt.zkconfig.ZookeeperConfigurationTest.java
@Test public void testFloat() throws Exception { Configuration config = new ZookeeperConfiguration(zkConnection, 5000, "/test"); final String key = UUID.randomUUID().toString(); final Random random = new Random(); final float val1 = random.nextFloat(); final Float val2 = random.nextFloat(); assertThat(config.getProperty(key), nullValue()); config.setProperty(key, val1); assertEquals(val1, config.getFloat(key), 10e-6); assertEquals(new Float(val1), config.getFloat(key, val2)); config.setProperty(key, val2); assertEquals(val2, config.getFloat(key), 10e-6); assertEquals(val2, config.getFloat(key, Float.valueOf(val1))); }
From source file:com.kentdisplays.synccardboarddemo.Page.java
/** * Decodes an input stream from a file into Path objects that can be used to draw the page. *//* ww w . j av a 2 s . co m*/ private static ArrayList<Path> pathsFromSamplePageInputStream(InputStream inputStream) { ArrayList<Path> paths = new ArrayList<Path>(); try { // Retrieve a byte array from the sample page. ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len; while ((len = inputStream.read(buffer)) > -1) { baos.write(buffer, 0, len); } baos.flush(); byte[] byteArray = baos.toByteArray(); // Decode the path data from the sample page. String rawString = EncodingUtils.getAsciiString(byteArray); int startIndex = rawString.indexOf("<</Length 13 0 R/Filter /FlateDecode>>") + 46; int endIndex = rawString.indexOf("endstream", startIndex) - 1; byte[] flateEncodedByteArray = Arrays.copyOfRange(byteArray, startIndex, endIndex); net.sf.andpdf.nio.ByteBuffer flateEncodedBuffer = net.sf.andpdf.nio.ByteBuffer .NEW(flateEncodedByteArray); net.sf.andpdf.nio.ByteBuffer decodedBuffer = FlateDecode.decode(null, flateEncodedBuffer, null); String decodedString = new String(decodedBuffer.array(), "UTF-8"); // Break every line of the decoded string into usable objects. String[] stringArray = decodedString.split("\\r?\\n"); for (int i = 0; i < stringArray.length; i++) { String[] components = stringArray[i].split(" "); Path path = new Path(); path.y1 = Float.valueOf(components[2]); path.x1 = Float.valueOf(components[3]); path.y2 = Float.valueOf(components[5]); path.x2 = Float.valueOf(components[6]); path.width = Float.valueOf(components[0]); paths.add(path); } } catch (IOException e) { e.printStackTrace(); } return paths; }
From source file:hivemall.dataset.LogisticRegressionDataGeneratorUDTF.java
private void flushBuffered(int position) throws HiveException { final Object[] forwardObjs = new Object[2]; if (dense) {/* w ww . ja v a 2s . c om*/ for (int i = 0; i < position; i++) { forwardObjs[0] = Float.valueOf(labels[i]); forwardObjs[1] = Arrays.asList(featuresFloatArray[i]); forward(forwardObjs); } } else { for (int i = 0; i < position; i++) { forwardObjs[0] = Float.valueOf(labels[i]); forwardObjs[1] = Arrays.asList(featuresArray[i]); forward(forwardObjs); } } }
From source file:com.github.binlee1990.spider.video.spider.PersonCrawler.java
private void setVideoScore(Document doc, Video video) { Elements sElements = doc.select("div#video_review td.text span.score"); if (CollectionUtils.isNotEmpty(sElements)) { String score = sElements.first().text().toString(); score = StringUtils.replace(score, "(", ""); score = StringUtils.replace(score, ")", ""); if (StringUtils.isNotBlank(score)) { try { video.setScore(Float.valueOf(score)); } catch (Exception e) { }//from ww w .j av a 2 s.c o m } } }
From source file:org.micromanager.CRISP.CRISPFrame.java
/** This method is called from within the constructor to * initialize the form.//from ww w . ja va 2 s. c o m * 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() { LockButton_ = new javax.swing.JToggleButton(); CalibrateButton_ = new javax.swing.JButton(); CurveButton_ = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); LEDSpinner_ = new javax.swing.JSpinner(); GainSpinner_ = new javax.swing.JSpinner(); NrAvgsSpinner_ = new javax.swing.JSpinner(); NASpinner_ = new javax.swing.JSpinner(); UpdateButton_ = new javax.swing.JButton(); SaveButton_ = new javax.swing.JButton(); ResetOffsetButton_ = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("ASI CRISP Control"); LockButton_.setText("Lock"); LockButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LockButton_ActionPerformed(evt); } }); CalibrateButton_.setText("Calibrate"); CalibrateButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CalibrateButton_ActionPerformed(evt); } }); CurveButton_.setText("Focus Curve"); CurveButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CurveButton_ActionPerformed(evt); } }); jLabel1.setText("LED Int."); jLabel2.setText("Gain Multiplier"); jLabel3.setText("Nr of Avgs"); jLabel4.setText("NA"); LEDSpinner_.setModel(new javax.swing.SpinnerNumberModel(50, 0, 100, 1)); LEDSpinner_.setPreferredSize(new java.awt.Dimension(50, 20)); LEDSpinner_.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { LEDSpinner_StateChanged(evt); } }); GainSpinner_.setModel(new javax.swing.SpinnerNumberModel(10, 0, 100, 1)); GainSpinner_.setPreferredSize(new java.awt.Dimension(50, 20)); GainSpinner_.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { GainSpinner_StateChanged(evt); } }); NrAvgsSpinner_.setModel(new javax.swing.SpinnerNumberModel(1, 0, 10, 1)); NrAvgsSpinner_.setPreferredSize(new java.awt.Dimension(50, 20)); NrAvgsSpinner_.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { NrAvgsSpinner_StateChanged(evt); } }); NASpinner_.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(0.65f), Float.valueOf(0.0f), Float.valueOf(1.4f), Float.valueOf(0.05f))); NASpinner_.setPreferredSize(new java.awt.Dimension(50, 20)); NASpinner_.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { NASpinner_StateChanged(evt); } }); UpdateButton_.setText("Refresh"); UpdateButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UpdateButton_ActionPerformed(evt); } }); SaveButton_.setText("Save Calibration"); SaveButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SaveButton_ActionPerformed(evt); } }); ResetOffsetButton_.setText("Reset Offset"); ResetOffsetButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ResetOffsetButton_ActionPerformed(evt); } }); jLabel5.setFont(new java.awt.Font("Lucida Grande", 0, 10)); // NOI18N jLabel5.setText("Version 1.0"); 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().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE) .addGap(6, 6, 6)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup().addComponent(jLabel4) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 83, Short.MAX_VALUE) .addComponent(NASpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup().addComponent(jLabel3) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE) .addComponent(NrAvgsSpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup().addComponent(jLabel2) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(GainSpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup().addComponent(jLabel1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE) .addComponent( LEDSpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(16, 16, 16) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(UpdateButton_, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE) .addComponent(ResetOffsetButton_, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE) .addComponent(CurveButton_, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE) .addComponent(SaveButton_, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup().addGap(18, 18, 18) .addComponent(LockButton_, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE) .addComponent(CalibrateButton_, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(19, 19, 19))) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(jLabel5).addGap(31, 31, 31))))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(17, 17, 17) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CalibrateButton_, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(LockButton_)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(UpdateButton_)) .addComponent(LEDSpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE) .addComponent(GainSpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(SaveButton_)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE) .addComponent(NrAvgsSpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ResetOffsetButton_)) .addGap(5, 5, 5) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE) .addComponent(NASpinner_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(CurveButton_)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel5) .addContainerGap())); pack(); }