Javafx 2.1: TableView CSS Removal Question
Hi all i was hoping someone would be able to advise me on a query as regards TableView CSS.
I have a tableView, inside of which i have a CellFactory to render my data. Inside of which i have the following condition check. That when found true i want to highlight the full row of the table.
if (checkData(FullData, TableItem)) {
this.getTableRow().getStyleClass().add("triggerHighLight");
} else {
this.getTableRow().getStyleClass().remove("triggerHighLight");
CSS Entry
#myTable .triggerHighLight{
-fx-background-color: #ebc500;
#myTable .triggerHighLight .table-cell {
-fx-text-fill: black;
This works fine.
However, if i want to highlight the row and also change the color of the text, i need to add .table-cell in order to change the text color. But when i go to remove the style. The change of text color remains. Would anyone be able to advise how i can remove the fx-text-fill also? I have tried the below but this dosnt appear to work.
this.getTableRow().getStyleClass().remove("triggerHighLight .table-cell");
Have you tried 2.2?
Add a style that reverts the color back to the caspian default:
#myTable .table-cell {
-fx-text-fill: -fx-text-inner-color;
}By the way, this.getTableRow().getStyleClass().remove("triggerHighLight .table-cell") will not work because the styleClass property is a List<String> (technically and ObservableList<String>) so you need to remove each styleClass individually.
this.getTableRow().getStyleClass().remove("triggerHighLight");
this.getTableRow().getStyleClass().remove("table-cell");
But then, you really don't want to remove the table-cell styleClass.
Similar Messages
-
TableView css , row border and on select fill
Hello , i'm trying to fill TableRow with some custom color.
On default , TableRow fills blue color on mouse selection.
How can i change blue to red or transparent from css ?I don't usually use inline styles (I prefer to factor the css out into separate stylesheets), but I don't think you can apply selectors using inline styles. Here, since you don't have a reference to the table row cell in your code, you pretty much have no choice but to use a stylesheet. You can apply the stylesheet to any parent (in the scene graph) of the table row cell, such as the scene, root, or just the table view (as in the example here).
TableWithStyle.java
import javafx.application.Application;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class TableWithStyle extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
final ObservableList<Person> data = FXCollections.observableArrayList(
new Person(1, "Joe", "Pesci"),
new Person(2, "Audrey", "Hepburn"),
new Person(3, "Gregory", "Peck"),
new Person(4, "Cary", "Grant"),
new Person(5, "De", "Niro")
TableView<Person> tableView = new TableView<Person>();
TableColumn<Person, Integer> idColumn = new TableColumn<Person, Integer>();
idColumn.setCellValueFactory(new PropertyValueFactory<Person, Integer>("id"));
TableColumn<Person, String> firstNameColumn = new TableColumn<Person, String>();
firstNameColumn.setCellValueFactory(new PropertyValueFactory<Person, String>("firstName"));
TableColumn<Person, String> lastNameColumn = new TableColumn<Person, String>();
lastNameColumn.setCellValueFactory(new PropertyValueFactory<Person, String>("lastName"));
tableView.getColumns().addAll(idColumn, firstNameColumn, lastNameColumn);
tableView.setItems(data);
BorderPane root = new BorderPane();
ScrollPane scroller = new ScrollPane();
scroller.setContent(tableView);
root.setCenter(scroller);
Scene scene = new Scene(root, 400, 250);
tableView.getStylesheets().add("table.css");
primaryStage.setScene(scene);
primaryStage.show();
* @param args
public static void main(String[] args) {
launch(args);
public static class Person {
private final SimpleIntegerProperty num;
private final SimpleStringProperty firstName;
private final SimpleStringProperty lastName;
private Person(int id, String fName, String lName) {
this.firstName = new SimpleStringProperty(fName);
this.lastName = new SimpleStringProperty(lName);
this.num = new SimpleIntegerProperty(id);
public String getFirstName() {
return firstName.get();
public void setFirstName(String fName) {
firstName.set(fName);
public String getLastName() {
return lastName.get();
public void setLastName(String fName) {
lastName.set(fName);
public int getId() {
return num.get();
public void setId(int id) {
num.set(id);
}table.css:
.table-row-cell:selected {
-fx-background-color: red ;
} -
Only making baby steps in CSS still but I am learning a lot. Here's a link to the page I am trying to create: http://www3.telus.net/~jessum/details_layout.html
Here's what I have managed to create so far: http://www3.telus.net/~jessum/details.html
When explaining any steps please explain it using Dreamweaver. I will be looking in the code to see how it all works but I want to be able to get proficient using Dreamweaver so I can see how things flow etc. before I try and hand code.
Questions
1. Is it a good practice to use a "container" to hold all of the div's or is it better to start by adding a header without a container?
2. How can I centre a div in the page?
I read that to align the div so it's "centred' in the page I can use: margin: auto;
but I'm not sure how to do this. Please explain.
3. How do I remove the space around the "container"? I've set the margin and padding to: "0" but the space is still there.
Thanksosgood_ wrote:
Not sure where this notion of using the body as a container came from but for years a wrapper or container was considered standard practice.
The idea is being promoted by several of the most active and knowledgeable members of this forum. I think the idea first came from Altruistic Gramps, and I remember debating the issue with him about a year ago. It has also been picked up enthusiastically by Murray, and I've seen Nancy O suggest the same idea.
I've been doing a lot of research into CSS3 recently, and discovered that the Borders and Backgrounds module specifically advises against styling the <html> element (http://www.w3.org/TR/css3-background/#special-backgrounds). It doesn't give a reason for this recommendation.
I suppose the idea of giving the body a width instead of using a container might come from the HTML5 definition of the body as representing the main content of the document (http://dev.w3.org/html5/spec/the-body-element.html#the-body-element).
I suspect that this is likely to develop into the same type of fruitless argument as we had several years ago about the "superiority" of ems over pixels. Adding a single <div> to act as the container or wrapper for the content doesn't strike me as being less efficient. It also has the advantage of avoiding styling the <html> element. -
Beginners CSS layout question - expanding a layer and not overlapping another
Having got well and truly fed up of using tables to layout
pages I am trying to gem up on CSS layer based layout. All well and
good but despite the various tutorials I can't find an answer to
this question...
Q. I have a layout with layers to make a three column layout,
however, I want to have a footer section at the bottom of the page
that runs the same width as the three columns (you can see my WIP
example here
http://www.spiralfilm.com/clients/broadoak/index_css.html
). Problem is, as the centre section expands with more content, how
do I make that section expand and not overrun the current footer
section? I want it to expand like a table does and push the footer
down.
I'm sure it is simple but I just can't get my head around it!
Thanks in advance for any pointers...> However, is the use of div tags the way to seperate
blocks of content? The
> DW8
> help file seems a little unclear on this?
Yes, it would be one way to do that. A div tag is simply a
container for
other HTML elements, like a table. The problem you are having
comes with
using DW 'layers' to contain text. As Thierry suggested, this
is because
absolutely positioned elements (i.e., DW 'layers') are
removed from the
normal flow, preventing them from interacting with adjacent
page elements -
this means that when the text inside them expands, it will
begin to overlap
other content. See my demonstration of this here -
http://www.great-web-sights.com/g_layers-overlap.asp
Try these tutorials -
http://www.macromedia.com/devnet/mx/dreamweaver/css.html
http://www.macromedia.com/devnet/dreamweaver/articles/tableless_layout_dw8.html
http://www.macromedia.com/devnet/dreamweaver/articles/css_concepts.html
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Benfrain" <[email protected]> wrote in
message
news:elgpba$qds$[email protected]..
> Hi, thanks for those links. Sorry to confess they are
all a little beyond
> my
> knowledge. I will read on and see if I can understand
them.
>
> However, is the use of div tags the way to seperate
blocks of content? The
> DW8
> help file seems a little unclear on this?
> -
Hi Everyone
I have several sites that I'm getting rid of some older CUCM 4.3 boxes and I have a question about CSS and PT. Currently none of the sites are connected by to a PUB & SUB setup, all the sites are independent of each other but when I remove the older boxes and they just have the GW and they connect across the want I wanted to know can I use the current CSS & PT that I currently have on my SUB at our data center. I've checked all the boxes and they have the exact same setup as CSS & PT goes. But once they all connect back will I have to change anything or would I have to make any additional ones. I'm attaching a copy of the names that we have and these names again are the same on all the older boxes and on our new PUB & SUB.
EricThat's up to your dial plan and requirements, you need to define whether the current dial plan adjusts to what the company wants, or if you need to modify it, but that's up to you.
-
Basic CSS Functionality Questions
Hi,
I have a CSS 11501 loaner on the way from Cisco, but was hoping to ask a few questions ahead of time. I am relatively new to this, so bear with me.
I have three offices connected via a VPN between two pix devices. Local users and anonymous web traffic all funnels through the remote office. I am hoping I can incorporate a CSS box to direct traffic (via a VPN to another pix) to a third office in the event the www server at the main office is not reachable, but return to the first office when it is back online.
I am a little confused by VIP. Right now, my domain name resolves to an IP address on the outside of my pix which NATs and sends the request on to my web server. If the CSS is behind it, do I create a VIP that maps to the actual IP of the www server, and have the pix send traffic to the VIP?
I have read the PDFs found online, but am still a little foggy.
Thanks,
JMthe Pix will have to send the traffic to the VIP.
The VIP should be an address existing only on the CSS and that the rest of your network knows how to reach.
The CSS will then nat to the real server ip.
Gilles. -
Hi guys,
Firstly a very Merry Christmas to you all !
I'm just getting to grips with converting all the text on my
site to CSS and have a quick question.
On some of my pages I add an 'Also see' links box aligned to
the right - it's a CSS div tag thingy someone kindly talked me
through once. All of my pages are built from a template with an
editable region.
My question is, can I add this box (perhaps with a standard
'Also check out' title and then spaces for my links) at the
template level? This will save me having to go to Insert>Layout
Objects>DivTag on every page. I've tried simply adding this to
the editable region of the template but it simply pushed the
editable region box over to the right and then didn't appear on my
pages
Also, the links box would ideally appear about half way down
my pages on the right...
Hope you can help, many thanks in advance!
James
Here's an example page where I have manually added my link
box on the right of the page...
http://www.fyrne.com/james_journalism/Pages/Mosaic_of_the_med.htmlYour CSS link implies that the CSS file is in the Templates
folder. You
shouldn't have anything there other than the template (dwt)
files
themselves. Please move it out to any other location in your
site.
<link href="../../Templates/Box.css" rel="stylesheet"
type="text/css">
Changes made to template editable regions would not propagate
to existing
child pages - that's why you aren't seeing that addition in
them....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"JamesFryer" <[email protected]> wrote in
message
news:[email protected]...
> Hi guys,
>
> Firstly a very Merry Christmas to you all !
>
> I'm just getting to grips with converting all the text
on my site to CSS
> and
> have a quick question.
>
> On some of my pages I add an 'Also see' links box
aligned to the right -
> it's
> a CSS div tag thingy someone kindly talked me through
once. All of my
> pages are
> built from a template with an editable region.
>
> My question is, can I add this box (perhaps with a
standard 'Also check
> out'
> title and then spaces for my links) at the template
level? This will save
> me
> having to go to Insert>Layout Objects>DivTag on
every page. I've tried
> simply
> adding this to the editable region of the template but
it simply pushed
> the
> editable region box over to the right and then didn't
appear on my pages
>
>
> Also, the links box would ideally appear about half way
down my pages on
> the
> right...
>
> Hope you can help, many thanks in advance!
>
> James
>
> Here's an example page where I have manually added my
link box on the
> right of
> the page...
>
http://www.fyrne.com/james_journalism/Pages/Mosaic_of_the_med.html
> -
CSS layout question regarding browser sizing
Hi,
Basically I want the basis of my site to be - A header, Main content with a background image, A Footer.
I'm having problems however, I can't seem to get my footer to position where I want it i.e. at the bottom of the browser window at all times. I'm doing it as an AP div and how it should work is that it's fixed at the bottom of the page and then if the user resizes their browser in the y direction the footer moves up with it, over the top of the main content (but not the header which will have a higher z-index).
The way I THOUGHT to do it was to firstly create a div tag for the whole page (780 pixels wide, auto left and right margins, auto height) and then inside that put my ap div header fixed height at the top and have another ap div as the footer, fixed height and tell it to position 0 pixels from the bottom. However this doesn't seem to do the trick, I'm sure I'm missing something really really simple. Anyone who's vaguely familiar with the program will be able to answer this I'm sure. If my question isn't clear please let me know and I'll rephrase,
TaThere is no reason to use APDivs for such a simple layout. Default CSS positioning (which is no positioning at all) is typically all you need for most layouts. Build your HTML markup logically from top to bottom of page and your footer will naturally appear at page bottom.
Live Demo (view page source to see the code)
http://alt-web.com/TEMPLATES/Basic-1-col-fixed.html
Or, for a Sticky Footer using Fixed positioning:
http://alt-web.com/DEMOS/CSS2-Sticky-Footer.shtml
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
CSS Layout Questions [locked]
Here's a link to the page I am trying to create: http://www3.telus.net/~jessum/details_layout.html
Here's what I have managed to create so far: http://www3.telus.net/~jessum/details.html
When explaining any steps please explain it using Dreamweaver. I will be looking in the code to see how it all works but I want to be able to get proficient using Dreamweaver so I can see how things flow etc. before I try and hand code.
Questions
1. Is it a good practice to use a "container" to hold all of the div's or is it better to start by adding a header without a container?
2. How can I centre a div in the page?
I read that to align the div so it's "centred' in the page I can use: margin: auto;
but I'm not sure how to do this. Please explain.
3. How do I remove the space around the "container"? I've set the margin and padding to: "0" but the space is still there.
ThanksMurray *ACP* wrote:
You already have a "container" - the body tag. You can center the page by giving the body an explicit width and then left/right margins of auto, e.g.,
body {
width:960px;
margin:0 auto;
The idea of using the body to centre the page seems to have become fashionable of late. The problem with doing so is that it leaves an unstyled area on the body's background extends into the left and right margins when displayed on a screen that is wider than the body. So, followers of this fashion then style the <html> element.
The CSS3 Borders and Backgrounds module specifically advises against styling the <html> element. See http://www.w3.org/TR/css3-background/#special-backgrounds.
Message was edited by: David_Powers to correct description of what happens in the margins. -
CSS layout question - height of outer DIV
Hopefully this is a quick one - In the past I've used CSS for the main layout of a page, but still used tables within a DIV. But I'm trying to be good and used DIVs there too.
Anyway - I have a basic example here:
http://www.learners-guide.co.uk/lessons/cockpit-drill/layout.php
With the row in the main content split into two columns, using:
#outerWrapper #contentWrapper #content #row_one {
width:580px;
border:2px solid #333;
background-color:#99FF99;
padding:10px;
#outerWrapper #contentWrapper #content #row_one #row_one_left {
width: 288px;
height:auto;
padding:0px;
float:left;
margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
#outerWrapper #contentWrapper #content #row_one #row_one_right {
width: 288px;
height:auto;
padding:0px;
float:right;
margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
The problem is that the #row_one_left and #row_one_right colums spill out of the containing #row_one DIV.
How would I make the containing DIV expand to contain the columns? I can do it by specifying a height of the #row_one DIV, but assume this is bad form, and would produce varying results depending on screen / resolution / browser etc.
I thought maybe using height: auto; but no joy with that either.
I'm assuming it must be possible, as it seems a fairly basic layout requiement.
Thanks.You have to use some style that forces that div to clear the floats (since floated elements are removed from the flow, containing elements act as if they aren't even there). To do that, something like "overflow:hidden" works wonderfully well. So remove the height:auto styles (which is the default anyhow), and change this -
#outerWrapper #contentWrapper #content #row_one {
width:580px;
border:2px solid #333;
background-color:#99FF99;
padding:10px;
to this -
#outerWrapper #contentWrapper #content #row_one {
width:580px;
border:2px solid #333;
background-color:#99FF99;
padding:10px;
overflow:hidden; -
How to get a mod. removed question out of my "Unanswered Questions screen"
Hello All,
I don't know where to ask this. So, I'll try here.
I have a question still listed in my "My Questions" screen.
It was removed by the moderators some time back, but remains in my "My Questions" screen.
It was removed pretty quickly by the moderators, so there was no time to mark it as answered.
So, now it appears as though I have a permanently unanswered question. So, my log-in will always show 1 unanswered question.
Right now, I see on the left-hand side, a message that says:
"You have 1 unresolved question(s)."
So, I am wanting to find out if there is any way for me to have this question removed from my account. This way I won't have any unanswered questions listed that are not actually active.
If you are a moderator with access to this, I'll grant you permission right here to remove this from my "My Questions" page.
The question in question is:
Mac Mini 1.5 CoreSolo really a CoreDuo???? - No Intel 1.5 CoreSolo Made
http://discussions.apple.com/thread.jspa?threadID=392125&tstart=0
Under the link, it says: "Administration » * Posts Removed by Hosts"
If there is a way that I can remove it from my "My Questions" page, I'd appreciate hearing about it.
Otherwise, could a Administrator or Moderator help me to do this.
Now, understand that if contacted for log-in information, I'm going to need some proof of the person being a moderator. I'm not going to give my account info to just anymore
Thank you in advance for any help you can offer.
I'll look forward to hearing from youHello All,
I just came back in, and noticed that they have removed the question from my "My Questions" screen.
So, looks like it is all fixed now
Thank you Moderators / Administrators.
It is much appreciated -
Help AVL Tree in JAVA code (remove) question-answer
Hi,
everyone. I have question.
I want codes in Java for AVL Tree.
I but must have remove methods or choose elements.
It`s main for me.
If you know, please write in code JAVA or contact e-mail.
or link to page or if you have self code.
thanks,
regards
[email protected]I have a better idea.
Why don't you try to do it yourself, and when you get stuck, post your code and details of what difficulty you're having.
When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read. -
Differences between old JavaFX and the new one: some questions
Hi,
I'm coming back to my JavaFX studies after 2/3 months and I see that some things are different.. Now, I have some questions:
1) I see that javafx.ui was deprecated or rewritten in favor of javafx.ext.swing. Why there are a javafx.application.Frame and a javafx.ext.swing.SwingFrame? Which one should I use?
2) Neither javafx.application.Frame or SwingFrame has the "*undecorated*" attribute that javafx.ui.Frame has. I got this feature only reimplementing createWindow() function like this:
function createWindow(): java.awt.Window {
//this is a trick, because Frame don't has a undecorated attribute.
var f: java.awt.Window = super.createWindow();
(f as javax.swing.JFrame).setUndecorated(true);
return f;
}Should I report this as a bug/RFE in [http://bugreport.sun.com/bugreport/] ? Where should I report bugs and RFEs to JavaFX?
3) Why frame's opacity don't work in Linux? Is this a Linux restriction or only a "not yet implemented" feature?
My java -version:
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)
4) Where is that cool feature that permits me to easily animate in JavaFX doing only x = [1..100] dur 1000? Now, I need to use this more advanced (and more complicated) Timeline object.
Timeline {
keyFrames:Timeline [
KeyFrame{time : 0s values: x => 0.0},
KeyFrame{time : 2s values: x =< 180.0 tween Interpolator.LINEAR}
]//keyFrames
}//Timeline;Sorry for the amount of questions.
TIA,
Bruno E. GrossiThe new ones will be substantially faster than yours because it has 8-cores instead of four, a faster Frontside Bus, and faster RAM speed.
You could use the same RAM, but since the new ones can accommodate a faster RAM module you would cause the machine to run slower by using the slower RAM from your old machine.
You can use the same hard drives since both machines support SATA drives.
On the other hand you could just be happy with what you have! It's probably more than you need. -
Hi All,
I have a couple of questions around the CSS 11501 would be grateful if any gurus out there cud shed more light, here goes;
-Does the CSS support bridging between 2 vlans? In a similar way to the CSM. What command might be used to achieve this?
Thanks.
Kind Regards,Thanks for your response Giles.
Gotcha, further more ... so if CSS is L-2 adjacent to the servers do the servers have to have loopbacks created for the VIP?
I wud assume this wud be required as the CSS will only be re-writting the MAC address? Can you please shed more light here as well.
Cheers -
Embedded Javascript and CSS removed from mail
Hey folks,
I wrote a small app to send a html email to myself.
When I sent it inline all the embedded javascript and css were removed.
When sent as a .html page attachment and opened from within the browser (Gmail, Mozilla 2.0)
all the embedded script and css were gone. However when downloaded to the machine, it was all there.
Looks like this is a browser issue, would anyone know how to get around it?
It's so that I can have collapsable headers in my email message.
Thanks,
Mark.Hi Tony.
Yes, it's possible. Read [Wiki WPC FAQ|https://wiki.sdn.sap.com/wiki/display/KMC/WebPageComposer-FrequentlyAskedQuestions+%28FAQ%29#WebPageComposer-FrequentlyAskedQuestions%28FAQ%29-WhataboutusingstandardHTMLpagesinWPC%3F].
KM supports relative links in HTML documents so it may be necessary include any dependent files in the same folder as the HTML document.
In case of a web page and its dependent files are stored in different folders you need editing the source html code:
1. use Portal Drive and any text editor (I prefer Notepad++. It has the feature "Search and Replace in files") to open the html source file.
2. search for links to dependent files and add the following pattern: /irj/go/km/docs//<path to an dependent file>/ before a filename, for example:
You have a web page with css file. The page is stored in documents repository under the folder with ID old_pages. The css is resides in css folder.
So the existing code
<LINK REL=STYLESHEET TYPE="text/css" HREF="css/style.css">
should be replaced with the
<LINK REL=STYLESHEET TYPE="text/css" HREF="/irj/go/km/docs//documents/old_pages/css/style.css">
Best regards,
Aliaksandr
Maybe you are looking for
-
SRM 5.0 Installation Documents
Hi I am planning to install SRM 5.0 Can anybody send me Installation and configuration documents as well as cookbook for the same. I will be really very thankful. My email id is [email protected] Thanks Vitthal prabhu
-
Disable iTunes from automatically opening when iPhone is connected
Hi, I use a windows xp comp with itunes for windows at work and whenever I just want to charge my iphone, itunes always automatically opens. I've disabled automatic syncing in edit>pref but the iPhone summary screen doesn't allow disabling "automatic
-
Is it possible to have many users share the same account folder in HD Users?
Hi! New guy here. I'm trying to set up somekind of Schedule for me to be able to use my mac only in the morning and only in the evening. Parental control seems to be able to allow me to do that if i set up two different accounts and assign time limit
-
Start up problem - blink code?
Hello, I'm new here so apologies if I have not found an already answered topic. I have a HP dv7 Laptop (17.3'' 2009 model), and when fired up the screen is blank (not even lit), the num lock & caps lock flash simultaneously and continuously at an int
-
Tcode for documentation of bapi
hi experts tcode can view the complete documentation of bapi data record online