private static SimpleIntegerProperty createIntegerProperty( final String name, final int defaultValue) { final SimpleIntegerProperty property = new SimpleIntegerProperty(null, name, p.getInt(name, defaultValue)); property.addListener(integerChangeListener); return property; }
public String toString() { String disponibilite = new String(" "); if (nombreStock.get() <= -1) disponibilite = disponibilite + " (Aucun ingrédients trouvé)"; else { if (nombreStock.get() == 0) disponibilite = disponibilite + " (RUPTURE DE STOCK)"; else { if (nombreStock.get() < 30) disponibilite = disponibilite + " (" + getNombreStock() + ")"; else disponibilite = disponibilite + " (30+)"; } } return nom.get() + disponibilite; }
public DrawerLayout() { AnchorPane.setTopAnchor(toggleLayer, 0d); AnchorPane.setRightAnchor(toggleLayer, 0d); AnchorPane.setBottomAnchor(toggleLayer, 0d); AnchorPane.setLeftAnchor(toggleLayer, 0d); toggleLayer.setBackground( new Background(new BackgroundFill(Color.BLACK, new CornerRadii(0d), new Insets(0)))); toggleLayer.setOpacity(0); toggleLayer.setVisible(false); toggleLayer.setOnMouseClicked( evt -> { if (evt.getButton().equals(MouseButton.PRIMARY)) { if (drawerOpened) { closeDrawer(); } } }); tableScreen.bind(widthProperty().lessThan(responsiveWidth).or(responsiveWidth.isEqualTo(0))); tableScreen.addListener( (observable, oldValue, newValue) -> { responsiveBehavior(newValue); }); }
public void setId(int i) { id.set(i); }
public void setAmount(int amnt) { amount.set(amnt); }
public void setIdCocinero(Integer idcoc) { idcocinero.set(idcoc); }
public Integer getId() { return idempleado.get(); }
public int getId() { return id.get(); }
public boolean isForceNarrow() { return responsiveWidth.getValue() == 0; }
public int getResponsiveWidth() { return responsiveWidth.getValue(); }
public void setNombreStock(int nb) { nombreStock.set(nb); }
public void setNombreVendu(String str) { nombreVendu.set(Integer.parseInt(str)); }
public void setNombreVendu(int nb) { nombreVendu.set(nb); }
public int getNombreBufferVente() { return nombreBufferVente.get(); }
public String getNombreStock() { return Integer.toString(nombreStock.get()); }
public String getNombreVendu() { return Integer.toString(nombreVendu.get()); }
public void setIdEmpleado(Integer idepp) { idempleado.set(idepp); }
public int getID() { return mID.get(); }
public void setID(int pID) { mID.set(pID); }
public void setNombreStock(String str) { nombreStock.set(Integer.parseInt(str)); }
public void setForceNarrow(boolean forceNarrow) { responsiveWidth.setValue(forceNarrow ? 0 : 800); }
public void setNombreBufferVente(int nb) { nombreBufferVente.set(nb); }
public boolean testStock() { return nombreStock.get() > 0; }
///////////////////////////////////////////////////////////////////////////////
public Integer getCode() { return code.get(); }
public int getAmount() { return amount.get(); }
public void setId(Integer id) { idempleado.set(id); }
public Integer getIdCocinero() { return idcocinero.get(); }