本文整理汇总了Java中javafx.scene.effect.ColorAdjust.setBrightness方法的典型用法代码示例。如果您正苦于以下问题:Java ColorAdjust.setBrightness方法的具体用法?Java ColorAdjust.setBrightness怎么用?Java ColorAdjust.setBrightness使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.effect.ColorAdjust
的用法示例。
在下文中一共展示了ColorAdjust.setBrightness方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawShadow
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
public static void drawShadow(Image image, double scale, GraphicsContext dst)
{
final double shadowSize = scale * SHADOW_SIZE;
final double shadowBlur = scale * SHADOW_BLUR;
GaussianBlur blur = new GaussianBlur(shadowBlur);
dst.drawImage(image, shadowSize * 2 / 3, shadowSize);
dst.applyEffect(blur);
ColorAdjust colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(SHADOW_BRIGHTNESS);
dst.applyEffect(colorAdjust);
dst.drawImage(image, 0, shadowSize);
dst.applyEffect(colorAdjust);
}
示例2: ModalStage
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
/**
* Creates a new RuleModalStage to be used in the Rule creation and removal.
*
* @param primaryStage
* The primary stage of the application.
*/
public ModalStage(Stage primaryStage) {
super(StageStyle.TRANSPARENT);
this.primaryStage = primaryStage;
initModality(Modality.WINDOW_MODAL);
initOwner(primaryStage);
colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(-0.275);
setOnCloseRequest(Event::consume);
setResizable(false);
Scene scene = new Scene(new HBox(), 800, 580);
scene.getStylesheets().add(ClassLoader.getSystemResource(Constants.RSC_CSS_SHARED).toExternalForm());
scene.getStylesheets().add(ClassLoader.getSystemResource(Constants.RSC_CSS_MODAL).toExternalForm());
setScene(scene);
}
示例3: CreationModalStage
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
/**
* The stage of the SIP exportation panels
*
* @param primaryStage
* The primary stage of the application
*/
public CreationModalStage(Stage primaryStage) {
super(StageStyle.TRANSPARENT);
this.primaryStage = primaryStage;
initModality(Modality.WINDOW_MODAL);
initOwner(primaryStage);
colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(-0.275);
setOnCloseRequest(Event::consume);
setResizable(true);
Scene scene = new Scene(new HBox());
scene.getStylesheets().add(ClassLoader.getSystemResource(Constants.RSC_CSS_MODAL).toExternalForm());
scene.getStylesheets().add(ClassLoader.getSystemResource(Constants.RSC_CSS_SHARED).toExternalForm());
setScene(scene);
}
示例4: RenameModalStage
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
/**
* The stage of the SIP exportation panels
*
* @param primaryStage
* The primary stage of the application
*/
public RenameModalStage(Stage primaryStage) {
super(StageStyle.TRANSPARENT);
this.primaryStage = primaryStage;
initModality(Modality.WINDOW_MODAL);
initOwner(primaryStage);
colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(-0.275);
setOnCloseRequest(Event::consume);
setResizable(true);
Scene scene = new Scene(new HBox(), 400, PREPARATION_HEIGHT);
scene.getStylesheets().add(ClassLoader.getSystemResource(Constants.RSC_CSS_MODAL).toExternalForm());
scene.getStylesheets().add(ClassLoader.getSystemResource(Constants.RSC_CSS_SHARED).toExternalForm());
setScene(scene);
}
示例5: select
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
@Override
public void select (Selector selector) {
ColorAdjust colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(selector.getLightness());
this.setEffect(colorAdjust);
this.setEffect(new Glow(selector.getGlow()));
}
示例6: select
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
/**
* determine selector for the object
*/
public void select (Selector selector) {
ColorAdjust colorAdjust = new ColorAdjust();
colorAdjust.setBrightness(selector.getLightness());
this.setEffect(colorAdjust);
this.setEffect(new Glow(selector.getGlow()));
}
示例7: colorize
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
/**
* Given a monochrome image, apply a color to it
*
* @param imageView A view to the target monochrome image
* @param color Target new image color
*/
public static void colorize(final ImageView imageView, final Paint color) {
final ColorAdjust monochrome = new ColorAdjust();
monochrome.setSaturation(-1.0);
monochrome.setBrightness(0.75);
final Blend selectionColorBlend = new Blend(BlendMode.SRC_ATOP,
monochrome, new ColorInput(0, 0, imageView.getFitWidth(),
imageView.getFitHeight(), color));
imageView.setEffect(selectionColorBlend);
}
示例8: SlideshowPanel
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
public SlideshowPanel() {
ColorAdjust brightness = new ColorAdjust();
brightness.setBrightness(-0.3);
imageViewNew.setEffect(brightness);
imageViewOld.setEffect(brightness);
getChildren().add(imageViewOld);
getChildren().add(imageViewNew);
}
示例9: updateImageAdjustments
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
private void updateImageAdjustments() {
double hue = Double.parseDouble(hueValue.getText());
double saturation = Double.parseDouble(saturationValue.getText());
double brightness = Double.parseDouble(brightnessValue.getText());
double contrast = Double.parseDouble(contrastValue.getText());
imageAdjustments = new ColorAdjust();
imageAdjustments.setContrast(contrast);
imageAdjustments.setBrightness(brightness);
imageAdjustments.setHue(hue);
imageAdjustments.setSaturation(saturation);
sourceImageView.setEffect(imageAdjustments);
}
示例10: createUI
import javafx.scene.effect.ColorAdjust; //导入方法依赖的package包/类
/**
* Only create the UI, using the initial stream as default which is also
* played at the start of the radio UI.
*
* @param parent
* @param stream the initially activated stream.
*/
private void createUI(ControllablePanel parent, Stream stream) {
setMinWidth(Mephisto3.WIDTH);
VBox labelBox = new VBox(20);
labelBox.getStyleClass().add("streams-panel");
labelBox.setMinHeight(Mephisto3.HEIGHT - 60);
labelBox.setAlignment(Pos.TOP_LEFT);
getChildren().add(labelBox);
getChildren().add(serviceScroller);
labelBox.setPadding(new Insets(20, 30, 30, 30));
artistBackgroundImageView = new ImageView();
ColorAdjust brightness = new ColorAdjust();
brightness.setBrightness(-0.3);
artistBackgroundImageView.setEffect(brightness);
parent.getChildren().add(artistBackgroundImageView);
nameLabel = ComponentUtil.createLabel(stream.getName(), "stream-name", labelBox);
HBox artistLabelBox = new HBox();
artistLabelBox.setMaxHeight(28);
artistLabel = ComponentUtil.createLabel(LOADING_DATA_TITLE, "stream-artist", artistLabelBox);
labelBox.getChildren().add(artistLabelBox);
metaDataBusyIndicator = new ProgressIndicator();
artistLabelBox.getChildren().add(metaDataBusyIndicator);
titleLabel = ComponentUtil.createLabel("", "stream-title", labelBox);
HBox spacer = new HBox();
spacer.setMinHeight(70);
labelBox.getChildren().add(spacer);
imageLoader = new HBox();
imageLoader.setOpacity(0);
imageLoader.setMinHeight(20);
imageLoader.setMaxWidth(Mephisto3.WIDTH);
imageLoader.setAlignment(Pos.CENTER_RIGHT);
labelBox.getChildren().add(imageLoader);
ComponentUtil.createLabel("Suche nach Bildern...", "", imageLoader);
imageDataBusyIndicator = new ProgressIndicator();
imageLoader.getChildren().add(imageDataBusyIndicator);
playerStatusBox = new StreamStatusBox();
getChildren().add(playerStatusBox);
//set the initial UI state
playerStatusBox.updateStatus(stream.getName(), null, null);
}