Classifier of color classes
Hi all
I want to get the list of Classes of the classifier color file. I used IMAQ classifier read of color, but it does not give the list of Classes.
I'm using Labview 2011.
Help, please.
Thanx
Classifier IMAQ precision refers, among other things, the list of classes.
Note that the classifier must be trained to use this VI.
Christophe
Tags: NI Hardware
Similar Questions
-
is there a chart that shows the real colors for all values in the Color class? It's kind of a pain to try them one by one...
Thank you!
All the colors in the color class conform to the specification of html4. Take a visit the link below... The colors given by name is more appropriate corresponding with the colors of the Color class!
http://en.wikipedia.org/wiki/X11_color_names#Color_names_identical_between_X11_and_HTML.2FCSS
Thank you!
-
Hello
I have no experience with the transformation of color class, but some with the concept of hexadecimal RGB.
We will use a small pseudo-code / hybrid actionscript:
In the following example, which does not work, I am trying to remove red and green colors and keep blue. How can I do this?
colour = 0xFFFFFF; colourTrans.rgb = colour; red = 0; green = 0; blue = 1; colourTrans.redMultiplier = red; colourTrans.greenMultiplier = green; colourTrans.blueMultiplier = blue; colour = colourTrans.rgb; // colour outputs 0, not the new blue colour
Thank you.
use:
Class com.kglad.Color_AS2 {}
usage example:
/*
import com.kglad.Color_AS2;
import flash.geom.ColorTransform;
Color_AS2.colorChangeF ();
var ct:ColorTransform = mc.transform.colorTransform;
this.onEnterFrame = function() {}
CT. RGB = Color_AS2.colorF ();
mc.transform.colorTransform = ct
}
*/
public static var Red: Object = new Object();
public static var Green: Object = new Object();
public static var Blue: Object = new Object();
public static var colorValueA:Array = [0, 15, 128];
public static var colorA: Array = [red, green, Blue];
public static var colorChangeA:Array = [1, -1];
public static var primeA:Array = [3, 5, 7];
function Color_AS2() {}
}
public static function colorChangeF() {}
for (var i: Number = 0; i< colora.length;="" i++)="">
.Val colorA [i] = Math.floor (Math.random () * 256);
colorA [i] .colorChange = 2 * Math.round (Math.random ()) - 1;
}
}
public static function colorF(n:Number):Number {}
If (! n) {}
n = 0;
}
If (n % 2000 == 1) {}
colorChangeF();
}
for (var i: Number = 0; i< colora.length;="" i++)="">
colorA [i] .val += primeA [i] * .colorChange colorA [i];
If (> 255 .val colorA [i]) {}
.Val colorA [i] = 254;
colorA [i] .colorChange * = - 1;
} ElseIf (.val colorA [i]< 0)="">
.Val colorA [i] = 1;
colorA [i] .colorChange * = - 1;
}
}
.Val colorA [0] return< 16="" |="" colora[1].val="">< 8="" |="">
}
}
-
Is it possible to get the class of a generic Type?
I wanted to male a generic class to map the static fields of a class, of the same type (think < tt > < /tt > Color.RED) and the only way I could find to get the class fields / was passing the literal class to the constructor. Is there a way to do this with a constructor with no arguments?
Since the usual question what about the reflection is usually "why?" I am including a possible use case.package darrylbu.util; import java.lang.reflect.*; import java.util.*; public class StaticFieldMap<T> extends HashMap<String, T> { @SuppressWarnings("unchecked") public StaticFieldMap(Class<T> clazz) { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { if (field.getType() == clazz) { try { put(field.getName(), (T) field.get(null)); } catch (IllegalArgumentException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } } } } }
Thank you for reading this and for your advice.import darrylbu.util.StaticFieldMap; import java.awt.Color; import java.util.Map; import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; public class ColorMapDemo { public static void main(String[] args) throws Exception { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new ColorMapDemo().makeUI(); } }); } public void makeUI() { final Map<String, Color> colorMap = new StaticFieldMap<Color>(Color.class); String[] data = colorMap.keySet().toArray(new String[] {}); final JPanel panel = new JPanel(); final JList list = new JList(data); list.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { panel.setBackground(colorMap.get((String)list.getSelectedValue())); } } }); list.setSelectedIndex(0); panel.add(new JScrollPane(list)); JFrame frame = new JFrame(); frame.add(panel); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300, 300); frame.setLocationRelativeTo(null); frame.setVisible(true); } }
DBDarryl Burke wrote:
Thanks Ben. Sorry - what a j.l.r. type?A java.lang.reflect.Type all j.l.Class implements this interface. What you have to do is this.getClass () .getGenericSuperclass () of the class, the cast of the Type returned to ParameterizedType, call getActualTypeArguments() and the result would be the color class object.
I don't really have the "requirements" being just a hobby programmer. But the other day I wrote a program to display all "named colors" of javafx.scene.paint.Color (there is a lot more than in java.awt.Color) and I felt that a utility class/method can be useful to have around.
Well, the technique described above is somewhat fragile, but achievable. If it is 'just' for a project, you need to decide for yourself if it's the right person.
Composition of favour over the legacy; StaticFieldMap should implement the map and delegate to an internal hash table.
Must do it, thanks. I guess that your reasoning behind the advice is that the class is a card but is-not-a HashMap. Am I wrong?
Correct, and the implementation details would be so leaked into your public API if it were to inherit from HashMap.
Or do you think it would be better/cleaner to do this with a utility method?
Yes. However, playing with the API j.l.r.Type is a good learning experience. I remember trying to use seriously and then thinking changed his mind. However there are cases where it makes sense to use [1].
With greetings
Ben[1] http://code.google.com/p/google-guice/wiki/FrequentlyAskedQuestions#How_to_inject_class_with_generic_type?
-
AppleScript: Create logos from the list of colors and hexagonal layer
I'm writing an AppleScript script that will create a bunch of PNG files of:
(1) a list of hex colors
(2) a Photoshop CS4 file that consists of a simple form that uses a logo as a vector mask layer.
I want to end up with different color versions of the logo - a red, a Meerschaum, one, a burnt sienna, etc. etc.
So far, I have this:
each word worth colorlist '002266 005566 006611...'
destinationFolder value "HD:Logos."
Tell application "Adobe Photoshop CS4"
activate
Repeat with theCurrentValue in colorlist
-- set the color of the shape layer current in the active theCurrentValue document
currentFilepath destinationFolder value & theCurrentValue & ".png".
Save the current document in the file currentFilepath in PNG with options {interlaced: false}
end repeat
end tell
So, how can I change the color of a shape layer?
How can I specify the color as a hexadecimal value?
Is this even possible things?
----------------
Finally, it is just me, or is the incredibly obtuse Adobe documentation? Well, maybe this isn't the right word. How about "useless." For example, I searched for hex script reference, but all I found was this:
RGB hexadecimal color
A hexadecimal RGB color specification. Hexadecimal RGB color class inherits the properties of color
value class.
Properties:
Property value what it is of Type
text in Unicode, the hexadecimal representation of an RGB to hex color value
Well, thank you very much. Sorry to be rude, but that is kinda like 'the copy command copies the selected object.
That's what I knocked together but I'm not sure what saved Mike because it does not work for me.
I saved the files but no color change the shape layer.
Can't really check up on my mac to work where I x Toolkit installed.
the value Dest_folder to (path to the diskette of starting text) & "logos:
the value Color_List to {"990000", '005566', '006611'} - a list
--
Tell application "Adobe Photoshop CS2"
activate
the value Doc_Ref for the active document
say Doc_Ref
Repeat with This_Value in Color_List
the value This_RGB to convert color {class hex color: RGB, hex value: This_Value} in RGB
the value {R, G, B} to { of This_RGB red, of This_RGB green, blue of This_RGB}
do javascript "colorToSolidColorLayer (" & R & ',' & G & "," & B &");").
function colorToSolidColorLayer (color) {}
ARG var = arguments [0] .constructor;
switch (arg) {}
occurrence of table:
var c = color;
break;
case SolidColor:
var c = new Array();
c.push (color.rgb.red);
c.push (color.rgb.green);
c.push (color.rgb.blue);
break;
case String:
var c = new Array();
var SC = new SolidColor();
sc.rgb.hexValue = color;
c.push (sc.rgb.red);
c.push (sc.rgb.green);
c.push (sc.rgb.blue);
break;
by default:
Returns - 1;
}
try {}
var / / desc = new ActionDescriptor();
Var ref = new ActionReference();
ref.putEnumerated (stringIDToTypeID ("contentLayer"), charIDToTypeID ('Ordn'), charIDToTypeID ("Trgt'));
desc.putReference (charIDToTypeID ("null"), ref);
var modeDesc = new ActionDescriptor();
var colorDesc = new ActionDescriptor();
colorDesc.putDouble (charIDToTypeID ('Rd'), c [0]);
colorDesc.putDouble (charIDToTypeID ("NRG"), c [1]);
colorDesc.putDouble (charIDToTypeID ("Bl"), c [2]);
modeDesc.putObject (charIDToTypeID ("Clr"), charIDToTypeID ("RGBC'), colorDesc);
desc.putObject (charIDToTypeID ("' t '), stringIDToTypeID ("solidColorLayer"), modeDesc);
executeAction (charIDToTypeID ('setd"), desc, DialogModes.NO);
} catch (e) {return-1 ;}
'} ' show the debugger runtime error
the value \\Server\share\file_path to Dest_folder & This_Value & ".png".
Save to file file_path in PNG with options ¬
{Category: PNG save options, intertwined: false} ¬
don't add any extension with a copy
end Repeat
end say
end say
-
How can I temporarily turn off the FN key?
I use Word Perfect as a processor in my legal writing and in my writing novel. I like to use the F keys as they are designated in WordPerfect, which is the button F3 for recording, press F4 to open the F5 key for printing etc.. I'm a very fast typist and I hate change! I myself have disconnected from the internet tries to use the F keys! Is there a way to temporarily disable function keys so that I can use in my other applications? I may need to contact Corel for how to do this? The word of the wise would be appreciated!
In fact, you will need to contact the company who made the computer. The 'Fn' key is in fact at the level of the material - Microsoft Windows and Corel cannot detect even if you press on it actually. You can try it out sometimes - if your screen saver is running, pressing Fn do not disable screen saver.
The reason for this is that it is a material modifier key. Only the processor under keyboard actually 'hears' when this button is pressed.
Now usually, there is a way to "Locking function", so that it does not need to be pressed to use the normal F keys. These are sometimes classified by color, could have a symbol or could really be labeled "Fn Lock". But each company who built computers need different, so I can't tell you absolutely.
On the Microsoft computer hardware (tablets of Surface and keyboards), you can Fn-Lock by pressing Fn + CapsLock together.
I know this doesn't directly what you're trying to do, but I hope that it gives you the information you need. Remember, you may need to contact some company built the computer to find out if they have a way to lock or unlock the Fn key.
-
2 questions about Calendar implementations (APEX 5.0)
Hello
I use 5 APEX on Oracle Express Edition.
I created a calendar that displays data in multiple tables.
Here is the query to simplify:
Select an evt, b datevt
FROM table1
Union
Select evt c, datevt d
from table2
Union
Select e TTE, f datevt
table 3;
I need to put up a link in the calendar on these data that display a modal page where users can see the details and update the data.
I have seen that it is possible to create a link on the calendar, but this link is considered to be a single page. In my case, I need to 3 different links, one per page.
Another question: I want to display these data on the calendar with a color that depends on the table. For example, blue for the first table, the Red during the second and the Orange for the third.
You have a solution that helps me implement those needs?
You will appreciate any help, and sorry if these questions have already addressed the Forum.
Thanks in advance
Vincent
2979122 wrote:
Please update your forum profile with a recognizable username instead of "2979122": Video tutorial how to change username available
Always include the information described in these guidelines when you post a question: How to get the answers from the forum
I use 5 APEX on Oracle Express Edition.
I created a calendar that displays data in multiple tables.
Here is the query to simplify:
Select an evt, b datevt
FROM table1
Union
Select evt c, datevt d
from table2
Union
Select e TTE, f datevt
table 3;
I need to put up a link in the calendar on these data that display a modal page where users can see the details and update the data.
I have seen that it is possible to create a link on the calendar, but this link is considered to be a single page. In my case, I need to 3 different links, one per page.
Another question: I want to display these data on the calendar with a color that depends on the table. For example, blue for the first table, the Red during the second and the Orange for the third.
You have a solution that helps me implement those needs?
An explanation of how to display events in different colors using CSS classes is given in the online help for the region calendar Class CSS attribute:
select ID, START_DATE, END_DATE, TASK_NAME, case STATUS when 'Open' then 'apex-cal-green' when 'Pending' then 'apex-cal-yellow' when 'Closed' then 'apex-cal-red' when 'On-Hold' then 'apex-cal-black' end as css_class, ASSIGNED_TO as supplemental_info from PROJECTS
The column specifying the apex - cal-* color class is then selected in the attribute of Class CSS region.
Link target URL can be built dynamically in the region of link attributes using chains of substitution that reference columns in the query. Again, see the online help for the link attributes. In a UNION like yours, a different target page can be specified in each request, and referenced in the link attribute display/change page numbers to specify the page number and set the values of the elements of the requested page:
Source of the region
select 10 x , trunc(sysdate) - 9 d , 'Foo' s , 'apex-cal-green' css_class , '10' link_page from dual union all select 20 , trunc(sysdate) - 6 , 'Bar' , 'apex-cal-yellow' , '11' from dual union all select 30 , trunc(sysdate) , 'Baz' , 'apex-cal-red' , '12' from dual
View/Edit link
f?p=&APP_ID.:&LINK_PAGE.:&SESSION.::&DEBUG.:10:P&LINK_PAGE._X:&X.
-
Change the strokeWidth using strokeColor
I'm new to JavaScript and I have some difficulty. I have some knowledge of python, but I found that it is quite different. I'm trying to figure out how to change the width of the outline for a path based on its color. There is a simplified version of my script below.
For some reason, she never recognizes the color of the path. I tried to compare the color class, that I created with the color of the outline, but it works. I also tried to make a comparison between the color RGB components, but it gives me an error. If I add path.strokeColor.RGBColor.red I get an error saying that "undefined is not an object.
The RGB color class should have a component red, right? I don't understand why it is undefined.
Does anyone have any ideas?
if (documents.length > 0 && activeDocument.pathItems.length > 0){ // Gets all the paths in the document var allPaths = activeDocument.pathItems; // This is the color I want to find, red var red = new RGBColor(); red.red = 233; red.green = 38; red.blue = 41; // Change the stroke of the path if it's a red line for (var l=0; l < allPaths.length; l++) { // select only red paths if (allPaths[l].strokeColor.RGBColor.red == red.red) { allPaths[l].strokeWidth = 10.0; } } }
In the case of javascript, "RGBColor" is actually the 'strokeColor '.
So you can just do:
If (allPaths [t].strokeColor.red == red.red) {}
-
Tung-E2 downloaded V4.1.4e desktop has no Media button
Tungsten E2 download V4.1.4E Desktop has no media button:
Here is the instruction manual - but the new download v4.1.4e doesn't have a Media button! What should I do? It gets tricky reinstall an older version of the operating system. Or - should I try to reinstall the 4.1.4e.
Windows: Use the media application in Palm Desktop to transfer pictures and videos to your handheld.
On your PC, open Palm Desktop and click "Media".
Use the button add media to add photos and videos to your handheld.
Perform a HotSync operation to transfer the elements of your handheld.f2kapr,
Whereas Desktop 6.2.2 installation allows you to resume the media conduit and the Viewer, you need to know its installation will remove lines to the expense, Notepad, VersaMail, not events classified by color, birthdays or anniversaries in your calendar will display and will remove any kind of customization (skin) you have previously enjoyed. You have to balance it with your desire to have the media conduit.
Many users tend to add media to their device by renouncing media operate entirely (there was some "problems" with the transfer of larger files, causing the Office locked) and manually add photos, music and video to the SD card via the burner/reader of their computer SD cards to access their device.
Photos should be placed in the folder DCIM creates your Palm, while music and video can be placed in the folders created. While not as 'automatic' as a HotSync, it is often faster and more reliable.
Meanwhile, there is an alternative to installation quick, accessible by selecting the desired file > right click > Send to... > Palm Powered Handheld (a shortcut for "instapp" in the Palm folder) in 4.1.4e or 6.2.2.
Message relates to: Palm TX
-
How your order of workflow would go PP AE to Speedgrade
Hey guys, wanted to see how your workflow would in these circumstances...
1. change something in PP
2. then need to add special effects like a flash of muzzle and bullet holes in AE
3-then need to add sound effects for the shots and VFX newly created pp
4. finally be accurate listening to classified Speedgrade color.
How your workflow would be to do something like that? I understand that you could just make every step of the process, but this does not appear effective and quality could do bad (?) I know also DL allows you to connect pp EI, but you would be able to do that for step 3 of the process without return? Any help is appreciated.
Still confused.
Get your projects in PP as usual. For clips requiring effects in AE, right-click on this element in the sequence and choose replace with After Effects Composition. This loads this clip in AE and bodyguard linked dynamically to the PP. If all changes made to this clip in AE is displayed automatically in PP, no export or the necessary intermediate files.
-
Editor-in-Chief of cell customized JTable loss of focus
It is a follow-up of in which I ask for pointers to help me understand the source of behavior lost focus in the custom my JTable cell editor.
I've done some research more and it turns out that loss of focus is a more general problem with the custom cell editors who call other windows. Even the demo of the pipette in the JTable tutorial at http://download.oracle.com/javase/tutorial/uiswing/examples/components/index.html#TableDialogEditDemo has this problem, IF you add a text field or both to the setting in FRONT of the table. Only in the demo table loses focus when the color picker appears, it is because the table is the only thing in the window!
Here's the code for demo, increased with two text fields, which are certainly bad here, but which serve the desired purpose:
When you come back to choose a color, tf1 is given to the development, instead of the table. This is because bringing the color selector window to front raises an event lost the focus to the cell editor component; It's temporary, as it should, then, why the hell is the system to lose track of who has the focus in the window?/* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither the name of Oracle or the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import javax.swing.*; import javax.swing.border.Border; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class TableDialogEditDemo extends JPanel { public class ColorEditor extends AbstractCellEditor implements TableCellEditor, ActionListener { Color currentColor; JButton button; JColorChooser colorChooser; JDialog dialog; protected static final String EDIT = "edit"; public ColorEditor() { //Set up the editor (from the table's point of view), which is a button. //This button brings up the color chooser dialog, which is the editor from the user's point of view. button = new JButton(); button.setActionCommand(EDIT); button.addActionListener(this); button.setBorderPainted(false); //Set up the dialog that the button brings up. colorChooser = new JColorChooser(); dialog = JColorChooser.createDialog(button, "Pick a Color", true, //modal colorChooser, this, //OK button handler null); //no CANCEL button handler } /** * Handles events from the editor button and from the dialog's OK button. */ public void actionPerformed(ActionEvent e) { if (EDIT.equals(e.getActionCommand())) { //The user has clicked the cell, so bring up the dialog. button.setBackground(currentColor); colorChooser.setColor(currentColor); dialog.setVisible(true); //Make the renderer reappear. fireEditingStopped(); } else { //User pressed dialog's "OK" button currentColor = colorChooser.getColor(); } } public Object getCellEditorValue() { return currentColor; } public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { currentColor = (Color) value; return button; } } public class ColorRenderer extends JLabel implements TableCellRenderer { Border unselectedBorder = null; Border selectedBorder = null; boolean isBordered = true; public ColorRenderer(boolean isBordered) { this.isBordered = isBordered; setOpaque(true); } public Component getTableCellRendererComponent( JTable table, Object color, boolean isSelected, boolean hasFocus, int row, int column) { Color newColor = (Color) color; setBackground(newColor); if (isBordered) { if (isSelected) { if (selectedBorder == null) { selectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5, table.getSelectionBackground()); } setBorder(selectedBorder); } else { if (unselectedBorder == null) { unselectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5, table.getBackground()); } setBorder(unselectedBorder); } } return this; } } public TableDialogEditDemo() { super(new GridLayout()); JTextField tf1 = new JTextField("tf1"); add(tf1); JTextField tf2 = new JTextField("tf2"); add(tf2); JTable table = new JTable(new MyTableModel()); table.setPreferredScrollableViewportSize(new Dimension(500, 70)); table.setFillsViewportHeight(true); JScrollPane scrollPane = new JScrollPane(table); table.setDefaultRenderer(Color.class, new ColorRenderer(true)); table.setDefaultEditor(Color.class, new ColorEditor()); add(scrollPane); } class MyTableModel extends AbstractTableModel { private String[] columnNames = {"First Name", "Favorite Color", "Sport", "# of Years", "Vegetarian"}; private Object[][] data = { {"Mary", new Color(153, 0, 153), "Snowboarding", new Integer(5), new Boolean(false)}, {"Alison", new Color(51, 51, 153), "Rowing", new Integer(3), new Boolean(true)}, {"Kathy", new Color(51, 102, 51), "Knitting", new Integer(2), new Boolean(false)}, {"Sharon", Color.red, "Speed reading", new Integer(20), new Boolean(true)}, {"Philip", Color.pink, "Pool", new Integer(10), new Boolean(false)} }; public int getColumnCount() { return columnNames.length; } public int getRowCount() { return data.length; } public String getColumnName(int col) { return columnNames[col]; } public Object getValueAt(int row, int col) { return data[row][col]; } public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } public boolean isCellEditable(int row, int col) { if (col < 1) { return false; } else { return true; } } public void setValueAt(Object value, int row, int col) { data[row][col] = value; fireTableCellUpdated(row, col); } } private static void createAndShowGUI() { JFrame frame = new JFrame("TableDialogEditDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JComponent newContentPane = new TableDialogEditDemo(); newContentPane.setOpaque(true); frame.setContentPane(newContentPane); frame.pack(); frame.setVisible(true); } public static void main(String[] args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } }
I see the following in #getMostRecentFocusOwner () Window:
My app has a custom course development policy, so I am able to see who is called, and indeed, getInitialComponent() is called. Clearly, the KeyboardFocusManager is in fact to lose track of the fact that the table was concentrated to the point where the control was transferred to the color picker! I think that is quite unreasonable, especially since, as mentioned, it is a temporary , not a permanent LostFocus event.public Component getMostRecentFocusOwner() { if (isFocused()) { return getFocusOwner(); } else { Component mostRecent = KeyboardFocusManager.getMostRecentFocusOwner(this); if (mostRecent != null) { return mostRecent; } else { return (isFocusableWindow()) ? getFocusTraversalPolicy().getInitialComponent(this) : null; } } }
I would be grateful for any wisdom to solve this, since a behavior similar to this little demo - without loss of focus, of course - is an essential part of my application.Hello
Or simpler, setFocusable (false)public ColorEditor() { button = new JButton(); button.setActionCommand(EDIT); button.addActionListener(this); button.setBorderPainted(false); button.setFocusable(false); //<---- add
-
How to build a JTree with nodes multi-line Windows L and am FJt
Although I already found 2 ways to build nodes multi-line JTree but both methods work very well in Java by default appearance and when I change my windows look and feel then it fails. I can't understand what is the problem. The two ways by which I build multi line nodes are:
First: Using html in nodes
as the DOSB linea < br > < html > < / html >
Secondly: By implementing TreeRenderer and change it accordingly, such a class is given below
but the two methods in the event of failure in a Windows look and feel, can anyone help with this?class ModifiedTreeCellRenderer extends JPanel implements TreeCellRenderer { protected JLabel icon; protected TreeTextArea text; public ModifiedTreeCellRenderer() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); icon = new JLabel() { @Override public void setBackground(Color color) { if (color instanceof ColorUIResource) color = null; super.setBackground(color); } }; add(icon); add(Box.createHorizontalStrut(4)); add(text = new TreeTextArea()); } @Override public Component getTreeCellRendererComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row, boolean hasFocus) { String stringValue = tree.convertValueToText(value, isSelected, expanded, leaf, row, hasFocus); setEnabled(tree.isEnabled()); text.setText(stringValue); text.setSelect(isSelected); text.setFocus(hasFocus); if (leaf) { icon.setIcon(UIManager.getIcon("Tree.leafIcon")); } else if (expanded) { icon.setIcon(UIManager.getIcon("Tree.openIcon")); } else { icon.setIcon(UIManager.getIcon("Tree.closedIcon")); } return this; } @Override public Dimension getPreferredSize() { Dimension iconD = icon.getPreferredSize(); Dimension textD = text.getPreferredSize(); int height = iconD.height < textD.height ? textD.height : iconD.height; return new Dimension(iconD.width + textD.width, height); } @Override public void setBackground(Color color) { if (color instanceof ColorUIResource) color = null; super.setBackground(color); } class TreeTextArea extends JTextArea { Dimension preferredSize; TreeTextArea() { setLineWrap(true); setWrapStyleWord(true); setOpaque(true); } @Override public void setBackground(Color color) { if (color instanceof ColorUIResource) color = null; super.setBackground(color); } @Override public void setPreferredSize(Dimension d) { if (d != null) { preferredSize = d; } } @Override public Dimension getPreferredSize() { return preferredSize; } @Override public void setText(String str) { FontMetrics fm = getToolkit().getFontMetrics(getFont()); BufferedReader br = new BufferedReader(new StringReader(str)); String line; int maxWidth = 0, lines = 0; try { while ((line = br.readLine()) != null) { int width = SwingUtilities.computeStringWidth(fm, line); if (maxWidth < width) { maxWidth = width; } lines++; } } catch (IOException ex) { System.out.println(ex); } lines = (lines < 1) ? 1 : lines; int height = fm.getHeight() * lines; setPreferredSize(new Dimension(maxWidth + 6, height)); super.setText(str); } void setSelect(boolean isSelected) { Color bColor; if (isSelected) { bColor = UIManager.getColor("Tree.selectionBackground"); } else { bColor = UIManager.getColor("Tree.textBackground"); } super.setBackground(bColor); } void setFocus(boolean hasFocus) { if (hasFocus) { Color lineColor = UIManager.getColor("Tree.selectionBorderColor"); setBorder(BorderFactory.createLineBorder(lineColor)); } else { setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); } } } }
Published by: user8978073 on April 30, 2011 10:24
Published by: user8978073 on April 30, 2011 10:25Can't check right now, but - afair, windowsLAF sets the rowHeight to a fixed value (16 or 18 or something like that). Consult the setRowHeight and make sure that there<= 0="" to="" indicate="" that="" it="" should="" be="">=>
-
It's quite embarrassing, I'm a newbie CF and do a project for my color class and had a question. This is my project to date and ran into some difficulties.
[IMG] http://i890.Photobucket.com/albums/AC102/F1GURIN/Screenshot2011-11-03at120856PM.PNG [/IMG]
This happens when I hover over the triangle/object (original) the problem is that this happens also when I mouse over each of the objects since to do all the stars and objects disappear I needed to make them all into a single button and change them to weaken State and more.
[IMG] http://i890.Photobucket.com/albums/AC102/F1GURIN/Screenshot2011-11-03at120902PM.PNG [/IMG]
How to achieve without convert them all into a single button?
E.g. I want the mouse on the subject of the 'origin' and all the other triangles fade out except "origin". When I mouse over the 'Modern' object I just want everything except 'Modern' to falter
Any help would be appreciated!
Thank you!
If I understand correctly what you're after, you need to look at creating a custom for this interaction component. This will help manage States that you will have (default), 1 turnover of ray, ray 2 reversal, etc.. You can add the interactions between each of the rays.
Here's a quick example to help you.
Chris
-
Area calendar: date range
Hello
I am trying to add tracks to a report of the calendar.
Here is exactly what I'm trying to achieve...
http://www.sumneva.com/Apex/f?p=15000:305:0
Does anyone know how this?
I tried messign autour with the date on the calendar, calendar end date, but I do not seem to get anywhere?
Thank you
RichardHello
I did it just now; do not use an application process as has been suggested in this thread, but created a procedure as follows:
create or replace procedure json (p_app_id in varchar2, p_session in varchar2, p_debug in varchar2, p_category_id IN NUMBER default -1, start_date in varchar2 default null, end_date in varchar2 default null) as --Same type as the internal apex vc_assoc_arr, just incase we can just use that later TYPE vc_assoc_arr is table of varchar2(32767) index by varchar2(255); event vc_assoc_arr; v_output clob; v_buffer pls_integer := 255; v_index pls_integer := 1; function json_escape(p_text varchar2) return varchar2 is --TODO: Correctly escape as per json specs begin return REGEXP_REPLACE(p_text,'[[:space:]]',' '); end; function jsonify_array(p_arr vc_assoc_arr, p_nest number := 0) return varchar2 is v_json_array VARCHAR2(32767) := ''; v_newline VARCHAR2(10) := ','||CHR(10); v_key VARCHAR2(255); v_nesting VARCHAR2(100) := LPAD(' ', p_nest, ' '); begin v_key := p_arr.FIRST; WHILE v_key IS NOT NULL LOOP v_json_array := v_json_array||v_nesting||'"'||v_key||'": "'||json_escape(p_arr(v_key))||'"'||v_newline; v_key := p_arr.NEXT(v_key); END LOOP; return REGEXP_REPLACE(v_json_array,v_newline||'$'); end; begin owa_util.mime_header('text/html', false); owa_util.http_header_close; --Because the JSON needs to return an array, it needs to return in the format --[{"property1" : "value1", "property2":"value2"},{"property1" : "value1", "property2":"value2"}] v_output := '['; for e in (select e.event_id, e.title, e.start_date, e.end_date, e.description, e.category from v_event e where (e.category_id = p_category_id or p_category_id = -1 ) and (e.start_date > sysdate-365 and e.start_date < sysdate+365)) LOOP --only return events that occur a year either side of today's date event('id') := e.event_id; event('title') := e.title; event('start') := to_char(e.start_date, 'yyyy-mm-dd'); event('end') := to_char(e.end_date, 'yyyy-mm-dd'); event('className') := replace(e.category, ' ', ''); event('url') := 'f?p='||p_app_id||':5:'||p_session||'::'||p_debug||'::P5_EVENT_ID:'||e.event_id; v_output := v_output || '{'; v_output := v_output || jsonify_array(event,2); v_output := v_output || '},'; END LOOP; v_output := substr(v_output, 1, dbms_lob.getlength(v_output)-1);--strip away the last comma v_output := v_output || ']'; --print out the contents of output for i in 1..ceil(dbms_lob.getlength(v_output)/v_buffer) loop htp.prn(substr(v_output,v_index,v_buffer)); v_index := v_index + v_buffer; end loop; end;
I spent in the application and the session only id for proposed to provide a detailed link. You also NEED to have the parameters start and end - but the default (from the fullCalender.js) is start and end, which will not because they are reserved words, that's why they have been renamed 'start_date' and 'end_date' respectively; Also must be matched to the actual fullCalendar.js file; There is a section:
// event ajax lazyFetching: true, startParam: 'start_date', --modify these two lines to be in the parameter specification of the procedure endParam: 'end_date',
Also in comment the following code in the fullcalendar.js file (it creates a parameter _ used for the cache - so you can comment out this line, or include this parameter in the procedure):
cache: options.cacheParam || false, // don't let jquery prevent caching if cacheParam is being used
And then the call to generate the real schedule looks like this:
$(document).ready(function(){ $('#calendar').fullCalendar({ events: "&OWNER..json?p_app_id=&APP_ID.&p_session=&SESSION.&p_debug=&DEBUG.&p_category_id=&P1_FILTER." }); });
Of course, you should be at your request of slider to suit your table - I also have my events classified by color, which probably do not need you (which is also one of the parameters of the proceedings, once again if you do not need, just remove this last parameter). And the grant procedure, it can be called.
grant execute on json to apex_public_user; --where json is the name of the procedure
Hope that helps.
Van
TrentPublished by: tr3nton on September 18, 2010 19:49
Published by: tr3nton on September 18, 2010 19:56
-
How to use setTint()?
Hi, if you know how to use the setTint() feature, please drop me and example code!
What I try to do is black tint to 60% thumbnails (Sprites), it should be 60% of Persian, I use a black shape on a Sprite on top of the image and the color of the shape the alpha value of 60% to the black but I saw setTint that I want to use it, or how I can do the same thing using colorTransform , which I don't know how to use, but do not know how to adjust the values to do things.
Thanks for your time!
rSYou must use the colortransform. settint is a method of the color class and instance color property is set to a colortransform to your processing of the object. something like:
yourColor.setTint (0 x 000000,.5);
yourObject.transform.colorTransform = yourColor;
Maybe you are looking for
-
who need to allow listening music when it is already licensed
When you try to listen to music, I just bought, it asks me to authorize my computer. I open a session goes hand in hand with the application for leave and he tells me that this computer is already authorized, but continues to not play or let me play
-
Qosmio X 300-130 and Vista 64 - bit - on screen display do not work
Hello I recently bought a laptop X 300 - 130 Qosmio comes with Vista Home Premium. The problem was that I couldn't get on our field to the office. So I installed Vista Business 64-bit. I found all the drivers online and everything works perfectly exc
-
Automatically connect when I click the icon, and I want to DISABLE it please help!
When I click the icon, I want to disbale auto, sign in. Anyone know how? Thank you
-
Prevent the Signal Express of auto racing
I just installed LabVIEW 2012 SP1 and now demand Express of Signal work alone at random. Is there a way to prevent this?
-
I want to install SP1 for windows vista 32 bit.
Original title: we must install ps1 for windows vista 32 bit. I tried to download it, but I'm not. What can I do?