congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ch.sahits.game.openpatrician.javafx.control
Code IndexAdd Tabnine to your IDE (free)

How to use ch.sahits.game.openpatrician.javafx.control

Best Java code snippets using ch.sahits.game.openpatrician.javafx.control (Showing top 20 results out of 315)

origin: ch.sahits.game/OpenPatricianJavaFX

private void setSelectedStyle(DecoratedText label, Boolean newValue) {
  if (newValue) {
    applyStyle(label, ACTIVE_LABEL_STYLE);
    removeStyle(label, DEFAULT_LABEL_STYLE);
    removeStyle(label, DISABLED_LABEL_STYLE);
  } else {
    applyStyle(label, DEFAULT_LABEL_STYLE);
    removeStyle(label, ACTIVE_LABEL_STYLE);
    removeStyle(label, DISABLED_LABEL_STYLE);
  }
}
origin: ch.sahits.game/OpenPatricianDisplay

/**
 * Remove the bold style from all Text elements.
 * @param texts list of text nodes that should have their style reset.
 */
private void resetStyles(List<DecoratedText> texts) {
  for (DecoratedText text : texts) {
    text.setStyle(DEFAULT_NON_SELECTED_STYLE);
  }
}
origin: ch.sahits.game/OpenPatricianDisplay

  @Override
  public void changed(ObservableValue<? extends Boolean> observableValue,
            Boolean oldValue, Boolean newValue) {
    nextShip.setDisable(!newValue);
    prevShip.setDisable(!newValue);
  }
});
origin: ch.sahits.game/OpenPatricianJavaFX

public DecoratedText createSimpleDecoratedText(String template) {
  DecoratedText text = new DecoratedText();
  text.setText(template);
  return text;
}
origin: ch.sahits.game/OpenPatricianDisplay

/**
 * Create a Node that forces vertical spacing.
 * @param heigth of the spacing node.
 * @return Node with specified <code>heigth</code>.
 */
public Node createVerticalSpacer(int heigth) {
  return new PlaceHolder(1, heigth);
}
origin: ch.sahits.game/OpenPatricianJavaFX

  @Override
  public void applyStyle(String style) {
    for (Node node : getChildren()) {
      if (node instanceof IApplicableStyle) {
        ((IApplicableStyle)node).applyStyle(style);
      } else {
        node.setStyle(style);
      }
    }
  }
}
origin: ch.sahits.game/OpenPatricianJavaFX

  @Override
  public void applyStyle(String style) {
    for (Node node : getChildren()) {
      if (node instanceof IApplicableStyle) {
        ((IApplicableStyle)node).applyStyle(style);
      } else {
        node.setStyle(style);
      }
    }
  }
}
origin: ch.sahits.game/OpenPatricianJavaFX

  @Override
  public void applyStyle(String style) {
    for (Node node : getChildren()) {
      if (node instanceof IApplicableStyle) {
        ((IApplicableStyle)node).applyStyle(style);
      } else {
        node.setStyle(style);
      }
    }
  }
}
origin: ch.sahits.game/OpenPatricianDisplay

private void deactivateAll() {
  for (Node node : loans) {
    if (node instanceof DecoratedText) {
      ((DecoratedText)node).applyStyle(DEFAULT_NON_SELECTED_STYLE);
    }
  }
}
origin: ch.sahits.game/OpenPatricianDisplay

  @Override
  protected boolean computeValue() {
    return moneyTransfer.getAmount() > 0;
  }
};
origin: ch.sahits.game/OpenPatricianJavaFX

 /**
  * Compute the filename based on the stretching factor
  * @param width of the button
  * @param height of the button
  * @return best matching stone slab image file name
  */
 private String getFileName(int width, int height) {
   float f = width*1f/height;
   String minDistFileName="StoneSlabBorderless.png";
   return getFileName(f, minDistFileName,slabMap);
 }
/**
origin: ch.sahits.game/OpenPatricianJavaFX

/**
 * Splitting up the text onto pages.
 * @param text to be split
 * @return list of Pages.
 */
public List<Page> splitIntoPages(Text text) {
  return splitIntoPages(text, false);
}
/**
origin: ch.sahits.game/OpenPatricianJavaFX

  @Override
  public PaginationV2 build() {
    return new PaginationV2(backButtonLabel, nextButtonLabel,
        backButtonNode, nextButtonNode, firstLastPageAction, text,
        contentMaxWidth, contentMaxHeight, paddingLocal,
        navigationLabelFont, headerFont, paragraphFont, centeredFont);
  }
}
origin: ch.sahits.game/OpenPatricianJavaFX

  /**
   * Create a new instance for the money transfer.
   * @return new control for the money transfer.
   */
  public MoneyTransfer getMoneyTransfer(IDataImageLoader imageLoader) {
    return new MoneyTransfer(imageLoader);
  }
}
origin: ch.sahits.game/OpenPatricianJavaFX

@Override
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
  return getClassCssMetaData();
}
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
origin: ch.sahits.game/OpenPatricianJavaFX

/**
 * Compute the line height and add it to the page height.
 * @param line to be checked
 * @param currentPageHeight current page height without <code>line</code>
 * @return new page height
 */
private double updatePageHeight(String line, double currentPageHeight) {
  double lineHeigth = sizing.computeTextHeight(font, line, Double.MAX_VALUE);
  currentPageHeight += lineSpacing + lineHeigth;
  return currentPageHeight;
}

origin: ch.sahits.game/OpenPatricianDisplay

private void deactivateAll() {
  for (Node node : loans) {
    if (node instanceof DecoratedText) {
      ((DecoratedText)node).applyStyle(DEFAULT_NON_SELECTED_STYLE);
    }
  }
}
private EventHandler<MouseEvent> createAcceptHandler() {
origin: ch.sahits.game/OpenPatricianDisplay

  @Override
  protected boolean computeValue() {
    return moneyTransfer.getAmount() > 0;
  }
};
origin: ch.sahits.game/OpenPatricianJavaFX

/**
 * Compute the filename based on the stretching factor
 * @param width of the button
 * @param height of the button
 * @return best matching stone slab extension file name.
 */
public String getFileNameExt(double width, double height, int capWidth) {
  float f = (float)((capWidth-width)/height);
  return getFileName(f, "StoneSlabExt.png",slabExtMap);
}
origin: ch.sahits.game/OpenPatricianDisplay

private void deactivateAll() {
  for (Node node : loans) {
    if (node instanceof DecoratedText) {
      ((DecoratedText)node).applyStyle(DEFAULT_NON_SELECTED_STYLE);
    }
  }
}
ch.sahits.game.openpatrician.javafx.control

Most used classes

  • BaleAmount
  • BaleAmountAlwaysVisible
  • BarrelAmount
  • BarrelAmountAlwaysVisible
  • CityIcons
    Icons of the city state.
  • CoinPriceAlwaysVisible,
  • DecoratedText,
  • DisplayMessageOverlayLabel,
  • EventMediaPlayer,
  • FightingSkillAlwaysVisible,
  • ItemNavigator,
  • MoneyTransfer,
  • NavigationSkillAlwaysVisible,
  • NoticeBoard,
  • OpenPatricianDialogInput,
  • OpenPatricianLargeWaxButton,
  • OpenPatricianRadioButton,
  • OpenPatricianSlider,
  • OpenPatricianSmallToggableWaxButton
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now