Change button onClick with HotSpot

Hello

I have a hyperlink button, which activates a slideshow (and if the slideshow is active, you must disable [fade out] the slideshow).

I want onClick of the button, the button will change its look and will accept a link, to weaken the slideshow.

If the button must have the functionality, which if the slideshow is active, there should be a link to weaken the slide show, and if the slideshow is disabled, it should have a link to activate the slide show. Also the content of the button should be changed, depends on the State of the slide show.

Could be done with only two buttons, which will fade themselves and show the other onclick.
But how to do this? Because if I convert this two buttons in a slide show, they can only see the States their own slideshow (slideshow buttons)!

Greetings!

OnRelease is the only support of button events. Do not use OnClick for DPS.

If the button is part of a State of the OSM, the appearance of the button will disappear as well as of the State when you move to another State.

Tags: Digital Publishing Suite

Similar Questions

  • How to change the Rectangles with buttons

    I'm working on this example that does not work correctly:

    public class test extends Application
    {
    
        private void init(Stage primaryStage)
        {
    
            Group root = new Group();
            primaryStage.setScene(new Scene(root));
    
            String pillButtonCss = DX57DC.class.getResource("PillButton.css").toExternalForm();
    
            // create 3 toggle buttons and a toogle group for them
            ToggleButton tb1 = new ToggleButton("Left Button");
            tb1.setId("pill-left");
            ToggleButton tb2 = new ToggleButton("Center Button");
            tb2.setId("pill-center");
            ToggleButton tb3 = new ToggleButton("Right Button");
            tb3.setId("pill-right");
    
            final ToggleGroup group = new ToggleGroup();
            tb1.setToggleGroup(group);
            tb2.setToggleGroup(group);
            tb3.setToggleGroup(group);
            // select the first button to start with
            group.selectToggle(tb1);
    
            //////////////////////////////////////////
    
            final VBox vbox = new VBox();
    
            final Rectangle rect1 = new Rectangle(300, 300);
            rect1.setFill(Color.ALICEBLUE);
            final Rectangle rect2 = new Rectangle(300, 300);
            rect2.setFill(Color.AQUA);
            final Rectangle rect3 = new Rectangle(300, 300);
            rect3.setFill(Color.AZURE);
    
            tb1.setUserData(rect1);
            tb2.setUserData(rect2);
            tb3.setUserData(rect3);
    
            group.selectedToggleProperty().addListener(new ChangeListener<Toggle>()
            {
                @Override
                public void changed(ObservableValue<? extends Toggle> ov, Toggle toggle, Toggle new_toggle)
                {
                    if (new_toggle == null)
                    {
                        //rect.setFill(Color.WHITE);
                    }
                    else
                    {
                        vbox.getChildren().addAll((Node[]) group.getSelectedToggle().getUserData());
                        //rect.setFill((Color) group.getSelectedToggle().getUserData());
                    }
                }
            });
    
    
            ///////////////////////////////////////////
    
    
            HBox hBox = new HBox();
            hBox.getChildren().addAll(tb1, tb2, tb3);
            hBox.setPadding(new Insets(20, 20, 260, 20));
            hBox.getStylesheets().add(pillButtonCss);
    
    
    
            vbox.getChildren().add(hBox);
            //vbox.getChildren().add(rect);
    
            root.getChildren().add(vbox);
        }
    
        @Override
        public void start(Stage primaryStage) throws Exception
        {
            init(primaryStage);
            primaryStage.show();
        }
    
        public static void main(String[] args)
        {
            launch(args);
        }
    }
    
    
    

    I want to create several Rectangles (or in which object or object) in which I want to store data. I want to spend the Rectangles (objects) that appear in front of the user by using the buttons. The example that I put in place does not work correctly. Can you tell me what is the right way to implement this?

    REF javafx 2 - How to change the Rectangles with buttons - stack overflow

    You have two problems:

    User data that assign you to each button switches are a node, not a [Node]. Thus, the cast will fail on line 43.

    When the selected toggle changes, you add another Rectangle to the vbox. You want to replace the rectangle that is in the vbox.

    Try

    vbox.getChildren () .setAll ((Node) group.getSelectedToggle () .getUserData ());

  • PJC button rollOver with square shape

    Hello
    1. I use forms10g
    2. I use PJC RollOver button in order to have the new feature - "button acts like a reversal of web style that can contain two images, an image that is displayed when the button is in normal state and a second image that appears when the mouse is over the button (or roll top)."
    3. it forces the button to round.
    4. How can I change button PJC rolling so that I'll get a square button or get the button without bevel?
    Thank you

    Here is the new code you can call form forms with the following for a non-borde button:

    Set_Custom_Property('BL.PB', 1, 'SET_RIGHT_MOST', 'false');
    Set_Custom_Property('BL.PB', 1, 'SET_LEFT_MOST', 'false');
    Set_Custom_Property('BL.PB', 1, 'SET_BORDER', 'false');
    Set_Custom_Property('BL.PB', 1, 'SET_BACKGROUND', 'false');
    
    package oracle.forms.demos;
    
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    
    import oracle.forms.ui.VButton;
    import oracle.ewt.button.PushButton;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.properties.Property;
    
    /**
     * 

    Oracle Forms Server PJC Example

    * * This is a PJC that implements a web style Rollover image button * where the image changes when the user moves the mouse over the component. The standard Forms * oracle.forms.ui.VButton is subclassed so only the additional functionality is required * to be added. * * We register two new forms properties, IMAGE_NAME_ON and IMAGE_NAME_OFF. These properties form the * the URL of the image files that the button will display. These properties will be set by PL/SQL * trigger code or can be set by defining the LABEL of the button with the prefix [ROLLOVER] followed by * the ON inage and OFF image names separated by a comma * * @version 1.0 09/13/1999 created
    * @version 1.1 12/09/1999 modified to support 6i features to allow dynamic custom property manipulation * @version 1.2 02/20/2000 removed 6.0 stuff and renamed package to oracle.forms.demos for distribution * @version 2.0 09/24/2001 amemded for Forms 9i. Moved to the oracle.forms.demos.enhancedItems package. Made the setting of the on/off images declaritive, using the Label Property. Allowed loading from a JAR file as well as codebase. * @author Steve Button, Duncan Mills * @version 3.0 05/05/2010 add some method to paint the button without border (F. Degrelle) */ public class RolloverButton extends VButton { /** * the property registered to specify the on image to be used */ public final static ID IMAGE_NAME_ON = ID.registerProperty("IMAGE_NAME_ON"); /** * the property registered to specify the off image to be used */ public final static ID IMAGE_NAME_OFF = ID.registerProperty("IMAGE_NAME_OFF"); /** * Forms property used to indicate that we want the utility to switch * Messaging on to the Java Console so we can see what is going on */ private static final ID DEBUGMESSAGES = ID.registerProperty("DEBUGMESSAGES"); /** * Forms property used to indicate that we want the utility to switch * Messaging on to the Java Console for ALL INSTANCES of this PJC * so we can see what is going on * This will generate a LOT of messages */ private static final ID DEBUGMESSAGES_ALL = ID.registerProperty("DEBUGMESSAGES_ALL"); /** * methods added by F.D. */ private static final ID RIGHTMOST = ID.registerProperty("SET_RIGHT_MOST"); private static final ID LEFTMOST = ID.registerProperty("SET_LEFT_MOST"); private static final ID DRAWBORDER = ID.registerProperty("SET_BORDER"); private static final ID DRAWBACKGROUND = ID.registerProperty("SET_BACKGROUND"); /** * define ON */ private final int ON = 1; /** * define OFF */ private final int OFF = 0; /** * the classname used for debugging purposes * use getClass().getName(); if you want the * full package name */ private final String CLASSNAME = this.getDefaultName(); /** * the hardcoded root directory for buttons in the JAR */ private final String JARBUTTONSDIR = "/oracle/forms/demos/images/"; /** * the hardcoded button icon type in the JAR */ private final String JARBUTTONSEXT = ".gif"; /** * the name of the on image */ private String m_imageNameOn; /** * the name of the off image */ private String m_imageNameOff; /** * storage for the handler for this class */ private IHandler m_handler; /** * The codebase from which the JAR was loaded - used to locate images */ private URL m_codeBase; /** * the current state ON | OFF */ private int m_state = OFF; /** * array to hold the images used to represent the state of the button */ private Image[] m_images = { null, null }; /** * Boolean value which describes if the button is currently a rollover or * if it is a general rounded button. */ private boolean m_isRollover = false; /** * do we want to debug for this class? Set this to true to see debug messages. */ private boolean m_debug = false; /** * do we want to debug for all instances of this class? */ private static boolean m_debugAll = false; private boolean m_border = true ; private boolean m_background = true ; public RolloverButton() { super(); log("Debugging on: Creating Button Instance"); setLeftmost(true); setRightmost(false); } /** * Implementation of IView interface which provides an initialization opportunity for the component * * @param handler - message handler associated with this view. * @see oracle.forms.ui.IView */ public void init(IHandler handler) { m_handler = handler; m_codeBase = handler.getCodeBase(); super.init(handler); } /** * Implementation of IView interface which sets a requested property to a given value * If the property being set is LABEL then special processing is undertaken. * If the Label is Prefixed with the string [ROLLOVER] then the rest of the label is assumed * to be a comma separated list of the ON and OFF icon names * If the String after the rollover tag does not contain a pair e.g. no comma * then we assume that it's one of the Icons in the JAR which will be called * xxx_on and xxx_off where xxx is the supplied string. We then set up the pair for * you e.g. a label of [ROLLOVER]firstrec will cause the icons * /oracle/forms/demos/images/firstrec_on.gif and * /oracle/forms/demos/images/firstrec_off.gif to be loaded * If the label does not begin with [ROLLOVER] then we treat it a a normal text label * except that leading or trailing round brackets can be used to indicate if * that edge of the button is rounded in Oracle look and feel * * @param property property to be set. * @param value value of the property id. * @return true if the property could be set, false otherwise. * @see oracle.forms.ui.IView */ public boolean setProperty(ID property, Object value) { if (property == ID.LABEL) { log("Setting Label to " + value.toString()); String label = value.toString().trim(); if (label.equals("")) { enableRollover(); return true; } if (label.startsWith("[ROLLOVER]")) { enableRollover(); label = label.substring(10); int i = label.indexOf(","); if (i > 0) { m_imageNameOn = label.substring(0,i); m_imageNameOff = label.substring(i+1); } else { m_imageNameOn = JARBUTTONSDIR + label + "_on" + JARBUTTONSEXT; m_imageNameOff = JARBUTTONSDIR + label + "_off" + JARBUTTONSEXT; } log("Detected Image Names + ON='" + m_imageNameOn + "', OFF= '" + m_imageNameOff + "'"); loadImage(ON,m_imageNameOn); loadImage(OFF,m_imageNameOff); setImage(OFF); return true; } else { /** * If the button label does not start with the [ROLLOVER] prefix * then we regard it as a normal button except that the programmer * can control the Rounded button look in Oracle Look and Feel by * placing a round bracket at the start or the end (or both) of the * label */ if (label.startsWith("(")) { log("Rounding left edge of " + label); setLeftmost(true); label = label.substring(1); } if (label.endsWith(")")) { log("Rounding right edge of " + label); setRightmost(true); label = label.substring(0,label.length()-1); } return super.setProperty(property, label); } } else if (property == RIGHTMOST) { String s = value.toString(); if(s.equalsIgnoreCase("true")) setRightmost(true); else setRightmost(false); return true ; } else if (property == LEFTMOST) { String s = value.toString(); if(s.equalsIgnoreCase("true")) setLeftmost(true); else setLeftmost(false); return true ; } else if (property == DRAWBORDER) { String s = value.toString(); if(s.equalsIgnoreCase("true")) m_border = true; else m_border = false ; return true ; } else if (property == DRAWBACKGROUND) { String s = value.toString(); if(s.equalsIgnoreCase("true")) m_background = true; else m_background = false ; return true ; } else if (property == IMAGE_NAME_ON) { // make sure we are in rollover mode enableRollover(); log("setProperty - IMAGE_NAME_ON value=" + value.toString()); // load the requested image m_imageNameOn = (String) value; loadImage(ON,m_imageNameOn); // reset the currrently drawn image if needed setImage(ON,m_state); return true; } else if (property == IMAGE_NAME_OFF) { // make sure we are in rollover mode enableRollover(); log("setProperty - IMAGE_NAME_OFF value=" + value.toString()); // load the requested image m_imageNameOff = (String) value; loadImage(OFF,m_imageNameOff); // reset the currrently drawn image if needed setImage(OFF,m_state); return true; } else if (property == DEBUGMESSAGES) { if (value.toString().equalsIgnoreCase("true")) m_debug = true; else m_debug = false; log("Debugging " + m_debug); return true; } else if (property == DEBUGMESSAGES_ALL) { if (value.toString().equalsIgnoreCase("true")) m_debugAll = true; else m_debugAll = false; log("Debugging " + m_debugAll); return true; } else { return super.setProperty(property, value); } } /** * Implementation of IView interface which returns the value of a requested property * * @param pid the property id that represents the property to be set * @return the value of the property id * @see oracle.forms.ui.IView */ public Object getProperty(ID pid) { if ( pid == IMAGE_NAME_OFF ) { return m_imageNameOff; } else if ( pid == IMAGE_NAME_ON ) { return m_imageNameOn; } else { return super.getProperty(pid); } } /** * Loads the requested image from the Document base, loaded JAR files, * or from the Codebase * Here is a breakdown of the logic: *
      *
    1. First we check the the loaded JAR files for the images
    2. *
    3. If it's not an inbuilt image, the code then checks the * image name supplied for http or https, if that is present * then it assumes the name is a full URL and loads the image from there.
    4. *
    5. If there is no Protocol in the image name then we assume it is a * relative URL to the docbase of the machine that Forms is running on. * We also pick up the protocol, and port and re-use those
    6. *
    7. If that fails to find the image, then we search relative to the * codebase e.g. forms/java
    * * @param which the image state to set, value values ON | OFF * @param imageName the name of the image to load, including extension */ private void loadImage(int which, String imageName) { URL imageURL = null; boolean loadSuccess = false; //JAR log("Searching JAR for " + imageName); imageURL = getClass().getResource(imageName); if (imageURL != null) { log("URL: " + imageURL.toString()); try { m_images[which] = Toolkit.getDefaultToolkit().getImage(imageURL); loadSuccess = true; log("Image found: " + imageURL.toString()); } catch (Exception ilex) { log("Error loading image from JAR: " + ilex.toString()); } } else { log("Unable to find " + imageName + " in JAR"); } //DOCBASE if (loadSuccess == false) { log("Searching docbase for " + imageName); try { if (imageName.toLowerCase().startsWith("http://")||imageName.toLowerCase().startsWith("https://")) { imageURL = new URL(imageName); } else { imageURL = new URL(m_codeBase.getProtocol() + "://" + m_codeBase.getHost() + ":" + m_codeBase.getPort() + imageName); } log("Constructed URL: " + imageURL.toString()); try { m_images[which] = createImage((java.awt.image.ImageProducer) imageURL.getContent()); loadSuccess = true; log("Image found: " + imageURL.toString()); } catch (Exception ilex) { log("Error reading image - " + ilex.toString()); } } catch (java.net.MalformedURLException urlex) { log("Error creating URL - " + urlex.toString()); } } //CODEBASE if (loadSuccess == false) { log("Searching codebase for " + imageName); try { imageURL = new URL(m_codeBase, imageName); log("Constructed URL: " + imageURL.toString()); try { m_images[which] = createImage((java.awt.image.ImageProducer) imageURL.getContent()); loadSuccess = true; log("Image found: " + imageURL.toString()); } catch (Exception ilex) { log("Error reading image - " + ilex.toString()); } } catch (java.net.MalformedURLException urlex) { log("Error creating URL - " + urlex.toString()); } } if (loadSuccess == false) log("Error image " + imageName + " could not be located"); } /** * Set the image displayed to the requested image if the requested image is the current image. * Effectively does a redraw of the currently displayed image if the image is changed by the user. * @param which the image state to draw, value values ON | OFF * @param current the current state being represented by the image */ private void setImage(int which, int current) { if(which==current) setImage(which); } /** * Set the image displayed to the appropriate image depending on the user action. * * @param which the image to display, valid values ON and OFF */ private void setImage(int which) { m_state=which; if(which==ON) log("setImage ON"); else log("setImage OFF"); this.setImage(m_images[which]); this.invalidate(); } /** * Creates the mouse listener for rollover mode * Also sets the button to fully rounded */ private void enableRollover() { if (!m_isRollover) { log("Enabling Rollover"); addMouseListener(new RolloverButtonMouseAdapter()); setLeftmost(true); setRightmost(true); m_isRollover = true; } } /** * draw the button */ public void paint (Graphics g) { if(m_border) { super.paint(g) ; } else { int iW = 0, iH = 0 ; int iX = 0, iY = 0 ; if(m_images[m_state] != null) { iW = m_images[m_state].getWidth(this); iH = m_images[m_state].getHeight(this); iX = (int)((this.getBounds().width / 2) - (iW / 2)) ; iY = (int)((this.getBounds().height / 2) - (iH / 2)) ; if(m_background) { g.setColor(this.getBackground()); g.fillRect(0,0,this.getBounds().width,this.getBounds().height); } g.drawImage(m_images[m_state],iX,iY,null); } } } public void update(Graphics g) { paint(g); } /** * Utility function to print out a debug message to the Java Console * @param msg string to display, this will be prefixed with the classname of the PJC */ public void log(String msg) { if(m_debug||m_debugAll) System.out.println(CLASSNAME + ": " + msg); } /** * Private class to handle user mouse actions and to switch images when the * user moves the mouse into and out of the button object. */ class RolloverButtonMouseAdapter extends MouseAdapter { /** * User moved the mouse over the button, swap to the on image. */ public void mouseEntered(MouseEvent me) { setImage(ON); } /** * User moved the mouse out of the button, swap to the off image. */ public void mouseExited(MouseEvent me) { setImage(OFF); } } }

    François

  • CREATE / change button apply is not working / doing nothing

    Hello

    Sound suddenly, CREATING / apply button the change of my FORM does nothing.
    When I press the CREATE / apply changes button... it displays an error with the following message page.

    -HTTP 400 Bad Request
    -The Web page is not found

    There has been no changes... it was working perfectly... suddenly I get this error.

    No idea... what may be the cause.

    Thank you
    Deepak

    Looks like it could be a connection problem. Try turning off all branches and creating a new one that just did a branch simply return to the current page.

  • Firefox crashes in typing or by clicking check box or the radio button, even with all the plugins / extensions removed. Check with many types of malware scanners.

    Firefox crashes in typing or by clicking check box or the radio button, even with all the plugins / extensions disabled, then deleted. Sometimes it hangs for five minutes. I checked the PC with several types of scanners of evil-ware, but none to be found. All hidden and deleted cookies, all DELETED & extension plugins. Remove all instances of Firefox PC and registry, then restored to bookmarks. The only thing that I did not is to remove and reinstall not my favorites.
    Windows Vista (yes I know) and FF 13.0.1

    Try disabling hardware acceleration in Firefox.

  • Can I change hard drive with an SSD in Toshiba NB100?

    Can I change hard drive with an SSD in Toshiba NB100?
    The hard drive in this model is the same size as SSD 2.5 drive "?

    Hello

    As far as I know the laptop supports the disk HARD 2.5 SATA.
    I think you could use a SATA SSD drive. Usually some SSDS require the firmware update but this should be provided by the manufacturers of SSD drives.

  • My screen iphone6 is cracked and in my country, they can only change the iphone with a new one and with a very high price. Is there anyway that I could replace just the screen?

    My screen iphone6 is cracked and in my country, they can only change the iphone with a new one and with a very high price. Is there anyway that I could replace just the screen?

    No, if you want to keep all rights to the service or support from Apple. Not to mention the fact that it then will be bork Touch ID and make the phone unusable if ever, you restore or update of iOS.

    Apple doesn't sell parts of the iPhone. There is no legitimate sources for replacement screens.

  • How to change two photo with Boolean control?

    Hello

    I want to change one image with another photo or change the color of an image with a Boolean control. is this possible?

    How?

    Best regards.

    In this case using a Pict control ring (from the palette of the ring & Enum) is probably the easyest way if you don't need to load images dynamically. To dynamically load, you can use a 2D (from the chart - controls palette) image control.

    Ben64

  • HP Deskjet 710C does not print colors (also after changing the cartridge with a new one)

    HP Deskjet 710C on Windows XP

    Problem: Printer does not print color. Black printing works. It also does not print color now, I changed the color with a new cartridge. Remove the printer from Windows XP and reinstall also does not resolve it. Also by using the option in Windows/printer driver for the cleaning cartridge has failed. Anyone know a solution to this?

    There is a document about the lack of color of the issues on the printer Deskjet 710C that can be found here.

    I hope this helps!

  • Another user changed the row with a primary key oracle.jbo.Key]

    I see many discussions about this error, but still cannot understand the difficulty that I need in my scenario.

    I am an Oracle Developer and completely new to ADF, please bear with me.

    I use JDeveloper 11.1.1.9.0

    My scenario:

    Creates an object editable view (UVO) with sub selects in the query, which is from several db tables.

    Creating a table using the UVO

    When I try to update a field in the table, and then click the validate, I get the error message:

    Another user changed the row with a primary key oracle.jbo.Key]

    Can someone explain in what scenarios I see this error and how do I solve this problem?

    Try the viewObject execution after validation and reQueryOnCommit set to true

    For details see - binary: a reason more for "Houston-25014: another user has modified the line containing oracle.jbo.Key primary key '

    Ashish

  • Changing channels of the hotspot wifi for your laptop

    Mr President.

    Sir I have transformed my cell phone as a wifi hotspot, success, but I can change the channels of this wifi signals? and if I can, then how?

    Hi Kunal,

    Ideally, the Wi - Fi channels are changed for the router in router configuration page.  It is not possible to change the channel of Wi - Fi if you connect using Hotspot. If you want to change the channel for hotspot Wi - Fi connection, then you can download and install the third-party software is available online.

    Note: using third-party software or a link, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third party software or link can be resolved. Using third-party software or a link is at your own risk.

    Please refer to the article for the wireless network profile management:

    http://Windows.Microsoft.com/en-us/Windows-8/manage-wireless-network-profiles

    It will be useful. If you have additional questions on the computer, please ask your question about Windows and we will be happy to help you.

  • Person changes button is disabled because of the events of life

    Hello

    I am trying to create a new life event 'new hire' type work. However, I find that define the changes of no and related person change button are disabled.  Kindly let me know what needs to be done. Receive a quick response.

    Thank you

    Paul George

    Hi all

    Thank you very much and I found a note related to this problem and it is mentioned here that if OAB (Oracle Advanced benefits) is not fully installed then the button is disabled.

    Kind regards

    Paul George

  • How to change or work with a .sket in Illustrator?

    How to change or work with a .sket in Illustrator? Can't select the object exported from the sketch. Thank you.

    Answer: You cannot directly use the .sket file.  You can send a JPG of the working version to everyone through stock supported options.

    Pseudo response (fast): If you want to work with vector paths in the project of the sketch (.sket) you will need a subscription Adobe CC ~.

    1. go in the specific figure that you want to send (click it like to change it in the application);

    2. send (Share) to Illustrator CC from the mobile application.  (to the same CC account you're connected to your iPad with);

    3. in Illustrator CC, choose from the options OBJECT toolbar > LINE & SKETCH ART > EXPAND to PATHS

    NOTE: This does not apply to the work of the brush.  It converts your work simple and features traces, change your work to something that does not resemble the project of .sket.  Fortunately, it does not save the file .sket of origin.

  • I just changed to PC with windows 10. I can't install photoshop elements version 1.0 despite my serial no save at Adobe

    I just changed to PC with windows 10. I can't install photoshop elements version 1.0 despite my serial no save at Adobe.

    Hello

    The Photoshop elements is not tested on the latest windows operating system.

    It may or may not work on your computer

    Please see the following link for the technical specifications of Photoshop elements 1.0: system requirements | Adobe Photoshop Elements

    Kind regards

    Shipti

  • Hi, im changing a sheet with writing on it (true leaf scaned) it's an old technique (90) and I wan't my text color is similar to that of the sheet (the color is spotted with black and white noise)

    ABM Verso - Copie test.png

    Hi, im changing a sheet with writing on it (true leaf scaned) it's an old technique (90) and I wan't the color of my text to be the same as in the worksheet (color is spotted with black and white noise) as you can see...

    Add a new layer above your text. Fill it with 50% gray. Add a bit of noise:

    Set the blending mode to lighten:

    Add a Gaussian blur to match the other text:

    Usage levels to set the contrast:

Maybe you are looking for