It's possible to disable custom color from color picker?

Hi guys!
I've searched in the threads about color picker but I found anything about it...
It's possible to disable the option to select a custom color? I work in a enterprise who makes softwares to brazilian clients, and not everybody understands english phrases...
Another way it's to translate the option, but I don't know if is possible too.
Thanks!

You definitely need to add the stylesheet to the Scene, not to anything else. If you take my example and change
scene.getStylesheets()...
to
root.getStylesheets()...
you'll see that it won't work any more.
The difference between this and the css you used is that the css you used is applied to the display of the color picker button; you need to apply styles to the popup (the color palette), which is not contained in your VBox or AnchorPanes. Notice how the font has changed for the name of the color in the button, but it hasn't changed for the "Custom Color" label you are trying to remove.
Somewhere there is some code that is adding the VBox you are subclassing to a Scene, and setting that scene into a stage. Your best option (perhaps second best option, see below) is to find that code so you can add the stylesheet to the Scene itself.
If you're working within a framework someone else has written, and can't access or change the code where the scene is defined, you have another option that I can see. Every Node has a scene property that refers to the scene to which that node belongs. So you could observe changes to that property and when it's updated, add the stylesheet to the scene.
So here is a hack to make my original hack work, in the event that you cannot access the scene directly, for some reason:
final String suppressCustomColorCss = getClass().getResource( "noCustomColorPicker.css").toExternalForm();
colorPicker.sceneProperty().addListener(new ChangeListener<Scene>() {
@Override
  public void changed(ObservableValue<? extends Scene> observable,
  Scene oldScene, Scene newScene) {
  if (newScene != null) {
  List<String> cssClasses = newScene.getStylesheets();
  if (!cssClasses.contains(suppressCustomColorCss)) {
  cssClasses.add(suppressCustomColorCss);
This code basically says "when the color picker becomes part of a new scene, add the stylesheet to that scene".
At this point, you're applying hack on top of hack to get the effect you need. I think if I were in this situation I would just go ahead and define my own color picker. All you really need is a MenuButton, a property to hold the selected color, and a popup with a layout of controls to choose an arbitrary color. It would be a bit of work, but shouldn't be too hard. If you take this option (which I think may be your best bet), it's more work now but it will be clear what you are doing - when you (or other programmers on your team) come back to the code later you'll understand how it works much better.
You should also file a couple of feature requests. One for API to enable/disable the option to choose a custom color, as this seems like a reasonable piece of functionality to have. The other should be for properly internationalized text for the labels in the color picker, as these are currently just hard coded into the source code in English.

Similar Messages

  • Is it possible to disable some popups from FEP Client on the desktop. But how to disable popups from real time protection

    Is it possible to disable some popups from FEP Client on the desktop. But how to disable popups from real time protection. This is so that end users who are non technical are not disturbed and only the I.T is aware of the viruses in teh environment.Shahid Roofi

    You could set policies which when a malware detected an action perform automatically without user interaction but there is no GPO which stop the notification, one reason could be that when notification keep appearing, then user will know something is wrong
    otherwise why FEP should display any warning.

  • Flash 5.5 on Lion crashing when choosing a color from color palette?

    When coloring an animation, Flash crashes on me every 3 minutes or so, when picking a color with color picker (first displaying wrong color). Or when choosing a color from color palette or color popup in a tool. It sometimes works, but often crashes when doing one of these things.
    Is there a fix for this i didn't find?

    When coloring an animation, Flash crashes on me every 3 minutes or so, when picking a color with color picker (first displaying wrong color). Or when choosing a color from color palette or color popup in a tool. It sometimes works, but often crashes when doing one of these things.
    Is there a fix for this i didn't find?

  • Why do I only see grayscale values when I add color from color picker? This happens occasionally, but I don't know what triggers it.

    Why do I only see grayscale values when I add color from color picker? This happens occasionally, but I don't know what triggers it.

    We can't know. You have not provided any system information, not told us what version of AE, details about your artwork, color management and whatnot.
    Mylenium

  • When ever I try to chose a color from the picker it automatically goes to black, is there any way to fix that?

    When ever I try to chose a color from the picker it automatically goes to black, is there any way to fix that?

    The program doesn't have any color actually, in the gradient or anything else.

  • Enable user to choose pick color from color palette

    hello, i have a program that uses the color-matching function. when the program runs, i want to allow the user to choose a color from a color pallete and then this color should be matched
    with the colors in images. i use "imaq setup match color pattern" and  "imaq color pattern" functions which use templates  as an input and these templates have to be manually assigned before run.
    is there a way to allow the color palette to act as a templete input???
    thankyou 

    Sure,  Put a color box control on the front panel.  It is located in the numeric palette.

  • Is it possible to get A gradient. from color to alpha? in illustrator?!

    I searched and i searched, i couldn't find anything. Like in photoshop is it possible why not in illustrator!??
    Explain plz. if it's possible or impossible?
    Thanks you.

    You need two objects to make an opacity mask. One is the solid object the mask is applied to, the other is a shaded object that applies the mask. You want a white box with a gradient above it. The gradient will go from white (solid) to black (transparent). Select both the gradient and the white box, then choose Make Opacity Mask from the Transparency palette.
    Oh, and ALWAYS provide version numbers. We can't help you if we don't know what you have.

  • How to get name of color from Color class

    Hi there,
    I'm just starting my adventure with java and just on the beginning of this trip I found some issue.
    How to get something like this:
    String getColorName(Color var) { ??? }
    String test = getColorName(Color.RED); // test = "red"; or test = "RED";Thank in advance for some constructive ideas

    profidancer wrote:
    dcminter, would You say it in other words, because I'm not following You.
    Do You mean by that to create class like below with some connection inside ??
    public class ColorMap {
         private String name;
         private Color color;
    public String toString() {
         return name;
    I suppose that's one way to do it. Or you could just use the [Map |http://java.sun.com/docs/books/tutorial/collections/interfaces/map.html] interface.
    Another option is to simply make the JButton the color it represents, instead of displaying some String with a color name. That way you could support any color pretty easily.

  • How do I remove saved colors from color palette?

    If I open the color palette in Mail there are several I have saved at the bottom, in the little squares below the color circle. Some are duplicates or ones I don't want any more. Yet I cannot get rid of them. Can't drag them off and can't find a way to eliminate them. Does anyone have an idea about this?
    Thanks,
    Richard

    Richard & Jeffrey,
    Thank you for posing the question and answering it. It is just what I wanted.
    Now one more thing Jeffrey - to put the icing on the cake(!)... can I name that saved color? I've tried clicking on it, but nothing happens.
    Thanks
    Geraldine

  • Is it possible to disable your apple ID from a phone, without having the phone?

    My mom's phone is set up with my apple id... I'm away at college, and my ipod is set with my apple id. I'm not trying to have her have access to my photostream and she keeps on getting the messages I send. Is it possible to disable my account from the active places its set up on? Without having her phone with me right now

    Have her sign out of the Apple ID on the device and sign in with her Apple ID.

  • Copy Custom toolbar from one instance to another in Project server 2007

    Hi,
    I am currently using project server 2007. We have a number of instances in our Project server enivoronment. Is it possible to copy customized toolbar from one instance to another? If yes, how?
    Thanks in advance 

    Hi Khaldun,
    As per my reply in your previous post, here is a link explaining how to use the organizer:
    Http://blogs.msdn.com/b/project/archive/2010/10/22/tips-and-tricks-copy-custom-views-filters-tables-and-other-elements-to-other-projects.aspx?Redirected=true
    Basically, just copy the toolbar from the global source instance into a blank project file. Then do the same operation from the blank file containing your toolbar into the destination global model, still using the organizer. 
    Hope this helps. 
    Guillaume Rouyre - MBA, MCP, MCTS

  • Moving custom brushes from Pshop CS5.5 to CS6

    Is it possible to move custom brushes from Pshop 5.5 to 6? When I choose Load in 6, I can't even open the Brushes folder in 5.5
    Will 5.5 brushes run on 64bit?

    Thank you for your professional response. You may be using a different Mac platform than I and all the Mac users I know. When I have Pshop open and search to transfer/load brushes, Finder does NOT appear in the Menu bar.... only the Apple icon and Pshop menu commands. The Apple icon is not the Finder.
    When I'm out of Pshop on the Desktop, which THEN displays Finder in the Menu bar, then there is NO way to transfer/load brushes into Pshop.
    Therein lies the ambiguity of your initial response.
    As you can see by these screen captures, the Rec Brush I created in a tutorial using 5.5 (first three images - v5.5), does not appear (fourth image - v6) when I attempt to Load it into 6 Brushes out of v5.5. Yet the Flames (SS) brushes (second, third, fourth images) I downloaded from a site DO appear and I was able to transfer them.
    The Load process (in v6) is not recognizing the CUSTOM brush (generated in v5.5) for some reason...

  • Is it possible to change the color of a layer of a Customs CSS from an External Style sheet?

    Hi,
    I have sucessfully link External .css  file to my HTML page and able to change the font size of the headlines and the paragraph.
    What I am not able to do is to ADD the color my Custom CSS from the External sheet.  I have difined the color attribute as a 'Advance'
    and gave it the same name "#bigwraper" that is has in my HTML file.
    Attached is the color outline of my 'Blank Layout' with colors?
    Thank you.
    Dreamer101.1

    Hi Murray,
    I am building a web site on which the entire content would be changed at least daily. The website would have similar design to www.Helium.com
    The page will have CCS layout boxes in which different content would  be pasted.
    To re-phrase my question:  I want to know how to change the color of a layer from an external style sheet?
    Because my home page 'Sidebar' and colors would be the same for all page, only the content of different pages would be different.  If I want to change a color of my web side pages, I need to learn how to do it in one spot through an External Style Sheet.
    I am amble to link my external style sheet and to change H1 tag and to give it different colors. But I was not sucess with change the color of a layer on which my content sits around.
    I took out the color from my HTML page and gave the same name to the layer in my External Style Sheet with the same color.
    Hope my question and the reason I was able to clarify.
    cheers,
    Dreamer101.1

  • Is it possible to disable visited link color for entire site.

    I have a 20 page site and am using text links in a sidebar for site navigation between pages. I desire to for a red hover color to appear when mouse cursor is over link. All works well the first time page is visited, cursor placed over Link1 changes color of Link1 text to red. Now if I click on Link1 and then return to the page on which Link1 was located, the cursor placed over Link1 does not show the hover color because the link now has the visited color. while I know I can edit the CSS file for each page (there are 20 or so) CSS to remove the "a:visited....." code to disable the visited color from overriding the hover color, doing so is rather inconvenient since the site is in very active development.
    Question: is there any way to globally disable the visited color or disable the visited color in iWeb?

    Robbo, at this time it not possible to disable the Edit Layout on the record detail page.

  • Is it possible to call custom designed RFC function module, apart from BAPI

    Hi Friends,
    1.     Is it possible to call custom designed RFC function module, apart from BAPI.
    2.     Why we call it Adaptive RFC layer, Since every time the JCO layer updated with SAP, Why can’t be dynamic.
    Thanx for Ur time.
    Cheers,
    Sam

    Also check <a href="http://help.sap.com/saphelp_nw04/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm">here</a> for more information on aRFC. Here you can find why it is called adaptive.
    Regards,
    Christophe

Maybe you are looking for