ADF: How to highlight cell(s) in chooseDate component
Hi,
I am using "ADF: ChooseDate" component for my application. Based on certain condition(s), I want to highlight a Date/Cell in the chooseDate calendar. I also want to customize the color for certain date (based on some conditions). I could not find a way to do it, Can someone please guide me.
Purpose of doing this: I want to design an application so that user can choose specific date (from calendar) for scheduling tasks. Once a task is created for a specific date then calendar should have some way of notifying user that some task(s) is/are already scheduled for specific dates. Thats why I am looking at a solution when dates can be highlighted (if there is any task scheduled for a particular date).
Best Regards,
Ajay
I'd speculate that the chooseDate component does not have the functionality you require. For this sort of funtionality I'd suggest you'd have to build your own component.
Not that is solves your problen, but if you're using JDev 11g, note that the ADF Faces RC chooseDate component does have attributes for disabledDaysOfWeek and disabledMonths.
CM.
Similar Messages
-
OO ALV - How to highlight cell after value change
Hi All,
I have an OO ALV with an input enable column and would like to highlight a cell in a different color when the user changes it's value.
I am using pr_data_changed->get_cell_value to check the cells value has changed and pr_data_changed->modify_cell to update the cell with the new value.
The output table has a field called CELLCOLOR of type LVC_T_SCOL which I am using to highlight the cell in red:
lw_cellcolor-fname = 'THISFIELD' .
lw_cellcolor-color-col = '7'.
The ALV layout is also correclty set using: layout-ctab_fname = 'CELLCOLOR'
All the above is working fine and the changed cell is highlighted HOWEVER it only works if I call METHOD g_grid->refresh_table_display
Is there anyway to highlight the cell without calling method refresh_table_display??????
I do not like to call method refresh_table_display in an ALV event. The main reason is if a user changes a cells value and at the same time selects the row for update then the method refresh_table_display wipes out the row selection marker.
So Is there anyway to highlight the cell without calling method refresh_table_display??????
All your help appreciated
CheTry this way
In the PAI use
call method get_selected_rows
This will get you the row index of the selected rows from the screen for example I_ROW
In PBO
call method g_grid->set_selected_rows
exporting
it_row_no = i_rows[].
then call refresh_table_first_display
So this one will keep row selection after the refresh_table_first_display method
a® -
How to highlight cell in a tree programatically when mouse arrow is moved over it
Hi
I would like to highlight a particular cell in a tree when a mouse arrow is moved over it. Similar to wndows drop down menu. Can anybody help me on these.
Regards
Bharath
Solved!
Go to Solution.But I find an issue with this. When there are items with same values in the tree, it always points to the first matched value (even if I set the active item tag to the one where I want to point to). For example, if I have a tree with values "Hello, Hi, Bye, Hello" and then I set the value to "Hello", it points to the first "Hello" even if I set the tag to the second yellow. Do you know any easy work around for this? Thank you!
jcarmody wrote: -
JTable, how to highlight cells with tooltips?
Hello all!
Mine problem is descriped in the topic - I though about custom cell renderer but I dont have an Idea how to change background for many other cells in other rows and don't change background in whole columns. Any of You could help?Hey thanks for replying.
With code like that:
public class yellowCellRenderer
extends DefaultTableCellRenderer
private int whichRow = 0;
public yellowCellRenderer(int saveToRow)
this.whichRow = saveToRow;
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
if(this.whichRow == row){
this.setBackground(Color.YELLOW); // All columns verified were empty - set our background RED
return this;
}and usage:
comments.add(comment);
JTable table = getMainTable();
TableColumnModel colModel = table.getColumnModel();
for(int i=0;i<comment.length;i++){
if(!Main.isStringEmpty((String)comment)){
TableColumn column = colModel.getColumn(i);
column.setCellRenderer(
new yellowCellRenderer(table.getRowCount()-1)
Every each cell in column gets yellow background... What am I doing wrong? -
How to highlight a cell if it matches a cell within a range.
To be more exact I am wanted to highlight cell A1 on sheet 2 if it matches any cell within a specific range on sheet 1.
Hi bnmueller,
It looks like we can choose a row or a column as a range but not a part of that column or row. This is a neat discovery. I had thought we can only compare to a single cell. Instead of clicking on a cell in your rule, click on a row or column.
You may be able to rework your table- or set up the equivilant of a look up table to use this.
Thanks for the question.
quinn -
How to highlight tree item ?
Hello everybody !
I have a question : how to highlight a tree item on a condition ? (please see the attached vi and the pictures for a clearer explanation of the problem)
I am using LabView 2014.
Thank you very much !
Solved!
Go to Solution.
Attachments:
Highlight_tree_item.vi 13 KBHave patience. You only aske the question about 40 minutes earlier.
You highlight rows like you want by writing values to the tree control. Don't mess with cell background color.
Are you trying to highlight multiple items? If so, then right click on the control and allow it to select 0 or more items. As soon as you select a mode with the possibility of more than one item, the tree values become an array of strings rather than just a string. You will need to build an array of strings that you will write to the control's local variable to highlight the multiple items. -
JPanel highlight cells in a grid
i would like to know how to highlight a particular cell when a user clicks on it?
Basically i have code to choose a specific cell but i dont know how to highlight them(like a border highlight, much like in Ms excel)cyrus666 wrote:
nono, im creating a game and i have a jpanel with a grid drawn on it.
basically i just want to highlight a cell i click....hope that makes senseIn that case you'll have to do it manually. Keep track of which cell was clicked, and draw the border around that cell. You ought to look into whether you could replace your grid with a JTable though, it provides things like that for you. -
Highlighting Cells automatically when data has no pattern
I'm pretty new to Numbers, and don't consider myself a spreadsheet expert in any case, so I apologize if I'm overlooking a very simple way to do what I'm trying to do.
I'm trying to set up a document with six different types of entries. The cell highlight colors need to change for each different entry type.
Each of the types has between 30 and 120 different possible names that could appear.
The way I approached this was to put all the possible names into the sheet (and hide the rows) so the person doing the data entry could have the auto-complete feature save them a lot of typing. Use of the auto-complete is essential to how this is going to be used.
Where I'm stumped though is how to highlight the different entry types with the proper colors. I can't see how to do it in the Conditional Format dialogue, as there's no pattern to the data sets that I can key off of.
Anyone able to help here? Did I manage to explain that well at all?
Thanks in advance.It's exactly what is done with my tip.
If an entry is of type1 available in popup1, it is given a color.
If an entry is of type2 available in popup2, it is given an other color.
This is the way I understand the question and of course, I responded accordingly.
If the OP want to be able to enter any kind of entry in a cell and get it displayed with a specific color, it's an other question (at least from my point of view) and it will require auxiliary table and auxiliary column.
The auxiliary table (Table 2) contains a list of accepted entries.
The accompannying number is a flag saying to whtch type it belongs.
In column C of Table 1 the formula is:
=IF(ISERROR(VLOOKUP(B,Table 2 :: A:B,2)),"",VLOOKUP(B,Table 2 :: A:B,2))
And you see the conditional rules.
Of course, we may set the Text Color equal to the Fill Color.
I leave to the OP the pleasure to search in existing threads the tip, given several times, using a transparent auxiliary table putting the color behind the cell in which is done the entry
Yvan KOENIG (from FRANCE jeudi 14 août 2008 16:38:28) -
Does anyone knows how to highlight every other row in numbers mac
Does anyone knows how to highlight every other row in numbers and are there any good tutorials out there???
Hi Lee,
Select a non-header cell in the table.
Open the Inspector and choose the Table Inspector.
Click to check the 'Alternating Row Color' box in the Cell Background section.
Click the Color well beside the check box to open the Color pane.
Choose a colour.
The alternating colours are applied only to the non-header rows and non-header columns in your table.
Regards,
Barry -
How to extend af:chooseDate component
I need to build a custom adf component which will be in extended form of af:chooseDate component.
How to extend adf components ?
any documentation or links will help me out ?
I need to enhance some features for the af:chooseDate component. How to do that ?
Is there any good links which will help me to develop custom adf components ?
Regards,
HoqueYou can create a custom declarative component that uses af:chooseDate component and expose additional properties/attributes.
For more details, read the following forum post:
how to "extend" an ADF faces component
Thanks,
Navaneeth -
How to highlight/indicate particular tree Node in Tree UI element
Hi All
Can anybody let us know how to highlight/indicate specific node in a tree struture.
currently i am able to display the tree struture with all the nodes & elements but it is always tasking firstnode as highlighted one or indicated one.
if i want to highlight specific node in a tree struture...what was the procedure or any sample code then it would be great help to us.
Thanks
Trisha raniHi Krishna
Thanks for your reply
I displayed the tree structure and i want to highlight specific parent node/child element , what was the sample code??
for example my tree was displayed in the below struture and at the runtime specific child node i wanted to be highlighted i want to make selectable particular nodeType......
Can you pls send sample codee code??
my requirement
A
A1
A2
A3
B
B1
B2
B3
B4
B5
now i want to make selectable or highlighted B4,B5 etc or A2,A3 at runtime.
The other guy who replied for this thread it is working for Parent nodes to make highlighted like it is working for parent nodes which is have child nodes. i am able to hightlight at runtime for Nodes A,B etc .
Now i want to highlight or make selected one for B4,A3 etc, pls provide sample code??
it would be great help to us
Thanks
Trisha Rani -
Please give me idea how I highlight the gird row which have
Sir
I have gird with 5 column
Vno
Code
Dept
Date
Amount
Sir my need is which record have above 5000 amount that color read and other color blue
It means above 5000 highlight in grid
Please give me idea how I highlight the gird row which have above 5000 maount
Thank
aamirPROCEDURE pr_Set_VA (p_VA IN VARCHAR2) IS
v_Feld VARCHAR2 (30);
v_Item VARCHAR2 (61);
v_Block VARCHAR2 (30);
BEGIN
v_Block := :SYSTEM.CURSOR_BLOCK;
v_Feld := Get_Block_Property (v_Block, FIRST_ITEM);
WHILE (v_Feld IS NOT NULL) LOOP
v_Item := v_Block || '.' || v_Feld;
Set_Item_Instance_Property (v_Item, CURRENT_RECORD, VISUAL_ATTRIBUTE, p_VA);
v_Feld := Get_Item_Property (v_Item, NEXTITEM);
END LOOP;
END; -
In ADF how can i insert data in multiple table if they have foreign key
I have started working on ADF and can anybody inform me in ADF how can i insert data in multiple table if they have foreign key,please?
Thnak you very much.Hello,
Still no luck.I am surely doing silly mistakes.Anyway,Here are my workings-
1> student_mst (id(pk),studentname) and student_guard_mst(id(fk),guardianname)
2> created EO from both of the tables,made id in both EO as DBSequence and an association was also generated.
3> i made that association composite by clicking the checkbox
4> i created 2 VO from 2 EO.
5> put those VO in Application Module.
6> dragged and dropped 2 VO on my jspx page and dropped them as ADF Form.
Now what to do please? -
How to highlight the messages in the WDA?
hi experts,
Iam new to Webdynpro.i just want to know how to highlight the texts displayed . like BOLD,italic etc and also colors.
Regards,
murthy.I dont think you have it via standard message area. Probably you can have a TextView UI element and use the properties Design and semanticColor to achieve this. If you have a contextNode , thats mapped to the texview and message manager writing text to this node. Solution should work.
Greetings
Prashant -
How to highlight Icon with mouse click ?
This program will open up a JFileChooser, Select one or more than one images from your computer. It will display them as Icons.
I am trying to highlight any icon with mouseclick from the program below but I am not able to do it. Please help. Thanks in advance.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.swing.*;
import javax.swing.border.Border;
public class IconIllustrate extends JFrame implements ActionListener, MouseListener
JLabel[] lblimage = new JLabel[10];
JPanel panAttachment = new JPanel();
JPanel panButton = new JPanel();
JButton bAdd = new JButton("Add");
Component comp = null;
Component c = null;
boolean bolVal = false;
public IconIllustrate()
// TODO Auto-generated constructor stub
panButton.add(bAdd);
bAdd.addActionListener(this);
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(panAttachment, BorderLayout.CENTER);
this.getContentPane().add(panButton, BorderLayout.SOUTH);
* @param args
public static void main(String[] s)
// TODO Auto-generated method stub
IconIllustrate ii = new IconIllustrate();
ii.setLocation(300, 200);
ii.setTitle("Testing Highlight Icon");
ii.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ii.setSize(400, 300);
ii.setVisible(true);
public void actionPerformed(ActionEvent ae)
// TODO Auto-generated method stub
if(ae.getSource().equals(bAdd))
JFileChooser chooser = new JFileChooser();
chooser.setMultiSelectionEnabled(true);
int answer = chooser.showOpenDialog(this);
File[] file = null;
String[] fileName = new String[10];
if(answer == JFileChooser.OPEN_DIALOG)
file = chooser.getSelectedFiles();
ImageIcon icon;
try
for(int i = 0; i < file.length; i++)
icon = new ImageIcon(file.toString());
ImageIcon thumbnailIcon = new ImageIcon(getScaledImage(icon.getImage(), 50, 40));
lblimage = new JLabel[10];
lblimage[i] = new JLabel();
lblimage[i].addMouseListener(this);
lblimage[i].setName("" + i);
lblimage[i].setBorder(BorderFactory.createEmptyBorder());
lblimage[i].setVerticalTextPosition(JLabel.BOTTOM);
lblimage[i].setHorizontalTextPosition(JLabel.CENTER);
lblimage[i].setHorizontalAlignment(JLabel.CENTER);
lblimage[i].setIcon(thumbnailIcon);
panAttachment.add(lblimage[i]);
panAttachment.revalidate();
catch(Exception ex )
ex.printStackTrace();
private Image getScaledImage(Image srcImg, int w, int h)
BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = resizedImg.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(srcImg, 0, 0, w, h, null);
g2.dispose();
return resizedImg;
public void mouseClicked(MouseEvent me)
// TODO Auto-generated method stub
int clickCount = me.getClickCount();
if(clickCount == 1 || clickCount == 2)
Component comp = me.getComponent();
Component c = comp.getComponentAt(me.getX(), me.getY());
// c.setPreferredSize(new Dimension(100, 100));
c.setBackground(Color.CYAN);
System.out.println("clickCount");
repaint();
this.panAttachment.revalidate();
public void mouseEntered(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseExited(MouseEvent arg0)
// TODO Auto-generated method stub
public void mousePressed(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseReleased(MouseEvent arg0)
// TODO Auto-generated method stubHi,
phungho2000 wrote:
Thank you for the Code. Now I am able to set the label border. I need to figure out how keep track of the last selected component so that I can reset the border.**g**
No, you have still fundamental misunderstood how listeners are working. You add a listener to a component. From this time on, this listener is watching this component. It listens if something occurs with this component therefor it is competent. If so, then it will pay attention to this. So the listener always knows the components it is in charge of. There is no need for you to "keep track of the last selected component" because the listener is doing this for you already.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.*;
public class FocusTesting extends JFrame implements FocusListener, MouseListener
// There is no need for JLabel fields here.
//JLabel labelA = new JLabel("Label A");
//JLabel labelB = new JLabel("Label B");
public FocusTesting()
super("FocusTesting");
JPanel paneFirst = new JPanel();
JPanel paneSecond = new JPanel();
paneSecond.setBackground(Color.gray);
//use simply FlowLayout for testing this
//paneFirst.setLayout(new BorderLayout());
paneFirst.setBorder(BorderFactory.createBevelBorder(2));
// pane.setBackground(Color.blue);
JLabel labelA = new JLabel("Label A");
// give the labelA a name only to show you, that the listener knows about the compontent it ist added to
labelA.setName(labelA.getText());
labelA.addMouseListener(this);
labelA.addFocusListener(this);
labelA.setFocusable(true);
JLabel labelB = new JLabel("Label B");
// give the labelB a name only to show you, that the listener knows about the compontent it ist added to
labelB.setName(labelB.getText());
labelB.addMouseListener(this);
labelB.addFocusListener(this);
labelB.setFocusable(true);
paneFirst.add(labelA);
paneFirst.add(labelB);
this.getContentPane().setLayout(new GridLayout(2, 1));
this.getContentPane().add(paneFirst);
this.getContentPane().add(paneSecond);
public static void main(String[] s)
//separate the initial thread form the event dispatch thread
SwingUtilities.invokeLater(new Runnable() {
public void run() {
FocusTesting ft = new FocusTesting();
ft.setLocation(300, 200);
ft.setSize(300, 200);
ft.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ft.setVisible(true);
public void focusGained(FocusEvent fe)
// TODO Auto-generated method stub
JComponent jcomp = (JComponent)fe.getComponent();
jcomp.setBorder(BorderFactory.createLineBorder(Color.GREEN, 5));
System.out.println("focusGained " + jcomp.getName());
public void focusLost(FocusEvent fe)
// TODO Auto-generated method stub
JComponent jcomp = (JComponent)fe.getComponent();
jcomp.setBorder(BorderFactory.createEmptyBorder());
System.out.println("focusLost " + jcomp.getName());
public void mouseClicked(MouseEvent me)
Component comp = me.getComponent();
comp.requestFocusInWindow();
System.out.println("mouseClicked " + comp.getName());
public void mouseEntered(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseExited(MouseEvent arg0)
// TODO Auto-generated method stub
public void mousePressed(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseReleased(MouseEvent arg0)
// TODO Auto-generated method stub
} You also should read again the Java Tutorial about Concurrency in Swing. Especially why and how to separate the initial thread form the event dispatch thread. [http://java.sun.com/docs/books/tutorial/uiswing/concurrency/initial.html]
Also have a look on [http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html], especially [http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#focusable] for why use the MouseListener too.
And if you have understood that all, then you may think about in what way it would be much easier to use JButton's instead of JLabel's for your clickable and focusable thumbnails.
best regards
Axel
Maybe you are looking for
-
How to make my iphone stop asking for my friend's Apple ID?
First question: why does apple website logs me out every minute saying "session time out" or something(i'm using chrome on iPad)..! Second Question: why after i typed such a big question and when i switch tab and come back to this tab, the tex disapp
-
Picture hyperlinks not working when published? Please help....
Some of the hyperlinks to my pictures do not work when I publish to my folder. I´ve tried to empty Safaris cache but it still doesn´t work. Please help me, pretty urgent....
-
Chart - PREVIEW and SAVE buttons disabled.
I am using BI Publisher Desktop with WORD 2007 on VISTA. When I attempt to add a chart to a rtf template, the PREVIEW and SAVE buttons are disabled. I can move data fields from the Data section into the Layout Section, select chart type, even the sty
-
On top of phone screen by battery symbol what is the lock with arrow around it mean
on top of phone screen by battery symbol what is the lock with arrow around it mean
-
Bonjour, mon macbook pro est neuf, c'est un refurb je viens tout juste de le recevoir à la suite d'un changement nombre pour nombre de cet ordinateur pour le meme problème . Il y a un trait blanc en haut du launchpad et sur les cotes en fonction de c