Codota Logo
kendzi3d.light.ui.action
Code IndexAdd Codota to your IDE (free)

How to use kendzi3d.light.ui.action

Best Java code snippets using kendzi3d.light.ui.action (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: kendzi/kendzi3d

  @Override
  public void actionPerformed(ActionEvent action) {

    if (lastFrame == null || !lastFrame.isDisplayable()) {
      // only one instance
      LightFrameAction frame = new LightFrameAction(lightService);
      frame.setVisible(true);

      this.lastFrame = frame;
    }
  }
}
origin: kendzi/kendzi3d

@Inject
public LightFrameAction(LightService lightService) {
  this.lightService = lightService;
  load();
}
origin: kendzi/kendzi3d

private boolean validate(Double direction, Double angle) {
  boolean directionError = direction == null || direction < 0 || direction > 360;
  boolean angleError = angle == null || angle < 0 || angle > 90;
  ValidateUtil.setComponentError(getDirectionText(), directionError);
  ValidateUtil.setComponentError(getAngleText(), angleError);
  return !(directionError || angleError);
}
origin: kendzi/kendzi3d

private void fillForm(LightConfiguration light) {
  getDirectionText().setText("" + light.getDirection());
  getAngleText().setText("" + light.getAngle());
  getLblAmbientColor().setBackground(light.getAmbientColor());
  getLblDiffuseColor().setBackground(light.getDiffuseColor());
}
origin: kendzi/kendzi3d

  @Override
  public void run() {
    try {
      LightFrame frame = new LightFrameAction(new kendzi3d.light.service.impl.LightService(new MemoryLightDao()));
      frame.setVisible(true);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
});
origin: kendzi/kendzi3d

@Override
protected void onDefault() {
  LightConfiguration light = lightService.loadDefault();
  fillForm(light);
}
origin: kendzi/kendzi3d

@Override
protected void onSelectAmbientColor() {
  Color color = JColorChooser.showDialog(this, "Select color", getLblAmbientColor().getBackground());
  getLblAmbientColor().setBackground(color);
}
origin: kendzi/kendzi3d

@Override
protected void onSelectDiffuseColor() {
  Color color = JColorChooser.showDialog(this, "Select color", getLblDiffuseColor().getBackground());
  getLblDiffuseColor().setBackground(color);
}
origin: kendzi/kendzi3d

@Override
protected void onOk() {
  String directionText = getDirectionText().getText();
  String angleText = getAngleText().getText();
  Color ambientColor = getLblAmbientColor().getBackground();
  Color diffuseColor = getLblDiffuseColor().getBackground();
  Double direction = ParseUtil.parseDouble(directionText);
  Double angle = ParseUtil.parseDouble(angleText);
  if (validate(direction, angle)) {
    lightService.save(new LightConfiguration(direction, angle, ambientColor, diffuseColor));
    // dispose();
  }
}
origin: kendzi/kendzi3d

private void load() {
  LightConfiguration light = lightService.load();
  if (light == null) {
    light = lightService.loadDefault();
  }
  fillForm(light);
}
kendzi3d.light.ui.action

Most used classes

  • LightFrameAction
    Light frame actions.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now