Exemple #1
0
  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;
  }
Exemple #2
0
  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();
 }
Exemple #11
0
 public void setNombreStock(int nb) {
   nombreStock.set(nb);
 }
Exemple #12
0
 public void setNombreVendu(String str) {
   nombreVendu.set(Integer.parseInt(str));
 }
Exemple #13
0
 public void setNombreVendu(int nb) {
   nombreVendu.set(nb);
 }
Exemple #14
0
 public int getNombreBufferVente() {
   return nombreBufferVente.get();
 }
Exemple #15
0
 public String getNombreStock() {
   return Integer.toString(nombreStock.get());
 }
Exemple #16
0
 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);
 }
Exemple #20
0
 public void setNombreStock(String str) {
   nombreStock.set(Integer.parseInt(str));
 }
 public void setForceNarrow(boolean forceNarrow) {
   responsiveWidth.setValue(forceNarrow ? 0 : 800);
 }
Exemple #22
0
 public void setNombreBufferVente(int nb) {
   nombreBufferVente.set(nb);
 }
Exemple #23
0
 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();
 }