How to implement row span and column span in JTable.
Hi,
How do we implement Col span and row span in JTable as in Html.
Kindly help.
Thank You
Although I suppose you could extend JTable to support column and row spans, this would involve a lot of of work and quite a few hacks. I think you will be better off either creating a new custom JComponent with an appropriate model for this purpose or using an existing solution such as [JIDE Grids|http://www.jidesoft.com/products/grids.htm] which includes a CellSpanTable.
Similar Messages
-
How to show row border and column border on Print page using CL_DD_DOCUMENT
Hiii to all,
I'm facing one printing issue regarding CL_DD_DOCUMENT class. i'm displaying my internal table contents into table format using method DISPLAY_DOCUMENT. it's showing table border on output container screen. But if i take print on printer (using method PRINT_DOCUMENT)it's not showing table borders. which attribute or parameter i need to set so i'll see table borders on print also.
Thanks..Hiii to all,
I'm facing one printing issue regarding CL_DD_DOCUMENT class. i'm displaying my internal table contents into table format using method DISPLAY_DOCUMENT. it's showing table border on output container screen. But if i take print on printer (using method PRINT_DOCUMENT)it's not showing table borders. which attribute or parameter i need to set so i'll see table borders on print also.
Thanks.. -
Print Row Numbers and Column Letters
How do you tell Numbers to print the Row numbers and Column letters? This was very simple in Appleworks (print dialog box had that option). Can't find it in Numbers though.
Here is a script doing all the job for us.
Just select one or several cells in a table and run the script.
It duplicates it, add an header row, an header column, insert the needed labels and fill the other cells with a formula grabbing the contents of the original table.
--[SCRIPT build a table with headers]
Enregistrer len tant que Script: build a table with headers.scpt
déplacer le fichier créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Selectionner une cellule dans la table à dupliquer
menu Scripts > Numbers > build a table with headers
Le script duplique la table et crée des en-têtes de lignes et colonnes.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
+++++++
Save the script as Script: build a table with headers.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select a range of cells in the table to 'duplicate'
menu Scripts > Numbers > build a table with headers
The script duplicate the table and inserts columns/rows headers.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (VALLAURIS, France)
2009/09/19
--=====
property theApp : "Numbers"
--=====
my activateGUIscripting() (* to be sure than GUI scripting will be active *)
set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
if r_Name is missing value then
if my parleAnglais() then
error "No selected cells"
else
error "Il n'y a pas de cellule sélectionnée !"
end if
end if
set new_Table to t_Name & "_#"
my duplicateTable(s_Name, t_Name, new_Table)
set delim to my getLocalizedDelimiter()
(* grab localized function names and add an open parenthesis at end *)
set IF_loc to my getLocalizedFunctionName("Numbers", "IF") & "("
set CHAR_loc to my getLocalizedFunctionName("Numbers", "CHAR") & "("
set INT_loc to my getLocalizedFunctionName("Numbers", "INT") & "("
set MOD_loc to my getLocalizedFunctionName("Numbers", "MOD") & "("
set INDIRECT_loc to my getLocalizedFunctionName("Numbers", "INDIRECT") & "("
set ADDRESS_loc to my getLocalizedFunctionName("Numbers", "ADDRESS") & "("
(* grab localized function names and add a couple of parenthesis at end *)
set ROW_loc to my getLocalizedFunctionName("Numbers", "ROW") & "()"
set COLUMN_loc to my getLocalizedFunctionName("Numbers", "COLUMN") & "()"
tell application "Numbers" to tell document d_Name to tell sheet s_Name to tell table new_Table
if column count = 256 then
if my parleAnglais() then
error "Oops, already 256 columns !"
else
error "Désolé, il y a déjà 256 colonnes !"
end if
end if
if row count = 65536 then
if my parleAnglais() then
error "Oops, already 65536 rows !"
else
error "Désolé, il y a déjà 65536 lignes !"
end if
end if
try
add row above row 1
on error
if my parleAnglais() then
error "Oops, already five header row !"
else
error "Désolé, il y a déjà cinq rangs d’en tête !"
end if
end try
try
add column before column 1
on error
if my parleAnglais() then
error "Oops, already five header columns !"
else
error "Désolé, il y a déjà cinq rangs d’en tête !"
end if
end try
set nbr to row count
set nbc to column count
(* =IF(COLUMN()<28,CHAR(COLUMN()63),CHAR(INT((COLUMN()-2)/26)+64)&CHAR(MOD(COLUMN()-2,26)65)) *)
set theFormula to "=" & IF_loc & COLUMN_loc & "<28" & delim & CHAR_loc & COLUMN_loc & "+63)" & delim & CHAR_loc & INT_loc & "(" & COLUMN_loc & "-2)/26)+64)&" & CHAR_loc & MOD_loc & COLUMN_loc & "-2" & delim & "26)+65))"
tell row 1
repeat with c from 2 to nbc
set value of cell c to theFormula
end repeat
end tell -- row 1
(* =ROW()-1 *)
set theFormula to "=" & ROW_loc & "-1"
tell column 1
repeat with r from 2 to nbr
set value of cell r to theFormula
end repeat
end tell -- column 1
(* =INDIRECT(ADDRESS(ROW()-1,COLUMN()-1,,,"Tableau 2")) *)
set theFormula to "=" & INDIRECT_loc & ADDRESS_loc & ROW_loc & "-1" & delim & COLUMN_loc & "-1" & delim & delim & delim & quote & t_Name & quote & "))"
repeat with r from 2 to nbr
repeat with c from 2 to nbc
set value of cell r of column c to theFormula
end repeat -- with c
end repeat -- with r
end tell -- Numbers
--=====
Set the parameter delimiter which must be used in Numbers formulas
on getLocalizedDelimiter()
if character 2 of (0.5 as text) is "." then
return ","
else
return ";"
end if
end getLocalizedDelimiter
--=====
on getLocalizedFunctionName(theApp, x)
local p2bndl
set p2bndl to (path to application support as text) & "iWork '09:Frameworks:SFTabular.framework:Versions:A:Resources:"
return my getLocalizedName(theApp, x, p2bndl)
end getLocalizedFunctionName
--=====
on getLocalizedName(a, x, f)
tell application a to return localized string x from table "Localizable" in bundle file f
end getLocalizedName
--=====
on getSelection()
local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
tell application "Numbers" to tell document 1
repeat with i from 1 to the count of sheets
tell sheet i
set x to the count of tables
if x > 0 then
repeat with y from 1 to x
try
(selection range of table y) as text
on error errMsg number errNum
set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
return {theDoc, theSheet, theTable, theRange}
end try
end repeat -- y
end if -- x>0
end tell -- sheet
end repeat -- i
end tell -- document
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=====
on isItAsheet(s)
try
tell application "Numbers" to tell document 1
count of tables of sheet s (*
Post an error if s is not a sheet *)
end tell
return true
on error
return false
end try
end isItAsheet
--=====
on activateGUIscripting()
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true (* to be sure than GUI scripting will be active *)
end tell
end activateGUIscripting
--=====
on duplicateTable(sourceSheet, sourceTable, newName)
local lesFeuilles, lesTables1, found, listOfRows, cor, i, isSourceSheet, nameI, j, lesTables2
tell application "Numbers"
activate
tell document 1
set lesFeuilles to name of sheets
if sourceSheet is in lesFeuilles then
tell sheet sourceSheet to set lesTables1 to name of tables
if sourceTable is not in lesTables1 then
if my parleAnglais() then
error "The sheet “" & sourceTable & "” of sheet “" & sourceSheet & "” is unavailable ! "
else
error "La table “" & sourceTable & "” de la feuille “" & sourceSheet & "” n'existe pas ! "
end if
end if -- sourceTable is not
else
if my parleAnglais() then
error "The sheet “" & sourceSheet & "” is unavailable ! "
else
error "La feuille “" & sourceSheet & "” n'existe pas ! "
end if
end if -- sourceSheet is in
end tell -- document
end tell -- application
if newName is not in lesTables1 then (*
Now, an ugly workaround to duplicate the sheet *)
set isOS4 to (system attribute "sys2") < 5
tell application "System Events" to tell application process "Numbers"
set docWindow to false (* CAUTION, an inspector ("AXFloatingWindow") or a Find/Search ("AXDialog") window may be open *)
repeat with i from 1 to (count of windows)
if subrole of window i is "AXStandardWindow" then
set docWindow to i (* got the document's window *)
exit repeat
end if
end repeat
if docWindow is not false then
tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window docWindow
select row 1
set value of attribute "AXFocused" to true
set found to false
set listOfRows to name of static text of every row
set cor to count of rows (* equal count of listOfRows *)
if isOS4 then (*
for mac Os X 10.4.11
CAUTION, listOfRows it's a list of lists !
{{"Feuille 2"}, {"Tableau 1"}, {"theSheet"}, {"Feuille 1"}, {"Tableau 2"}, {"Clément"}, {"Feuille 4"}} *)
repeat with i from 1 to cor (*
Scan the thumbnails *)
set nameI to item 1 of item i of listOfRows
set isSourceSheet to (sourceSheet = nameI) and my isItAsheet(nameI)
if isSourceSheet then
select row i
if (i < cor) and not my isItAsheet(item 1 of item (i + 1) of listOfRows) then (*
Here we may scan the thumbnails of tables of sourceSheet *)
repeat with j from i + 1 to i + (count of lesTables1)
if sourceTable = item 1 of item j of listOfRows then
select row j
set found to true
exit repeat
end if -- sourceTable
end repeat
else
if my parleAnglais() then
error "The sheet “" & sourceTable & "” of sheet “" & sourceSheet & "”" & return & " is not revealed in thumbnails ! "
else
error "La table “" & sourceTable & "” de la feuille “" & sourceSheet & "”" & return & " n'est pas affichée dans les vignettes ! "
end if -- my parleFrancais
end if -- (i < cor)
end if -- isSourceSheet
if found then exit repeat
end repeat -- i
else (*
for mac Os X 10.5.x
CAUTION, listOfRows is a list of lists !
{{}, {"Tableau 1"}, {"theSheet"}, {}, {"Tableau 2"}, {"Clément"}, {}}
With 10.5.x, the names of sheets are empty *)
repeat with i from 1 to cor
set isSourceSheet to (class of UI element 1 of row i is group) and (get value of static text 1 of group 1 of row i) is sourceSheet
if isSourceSheet then (*
Here we may scan the thumbnails of tables of sourceSheet *)
if value of UI element 1 of group 1 of row i is 0 then (*
reveal the tables's thumbnails and adjust the list accordingly *)
click UI element 1 of group 1 of row i (* click the black triangle to reveal tables *)
delay 0.1
set listOfRows to name of static text of every row (* update the list accordingly *)
end if -- value of UI…
repeat with j from i + 1 to i + (count of lesTables1)
if sourceTable = item 1 of item j of listOfRows then
select row j
set found to true
exit repeat
end if -- sourcetable
end repeat -- with j
end if -- isSourceSheet
if found then exit repeat
end repeat -- with i
end if -- check OS
end tell -- outline …
keystroke "d" using command down
end if -- docWindow
end tell -- System Events…
if docWindow is not false then (*
Rename the new table according to the passed name: newTable *)
tell application "Numbers" to tell document 1 to tell sheet sourceSheet
set lesTables2 to name of tables
repeat with i in lesTables2
if i is not in lesTables1 then (*
Here i is the name of the newly created table *)
set name of table i to newName
exit repeat
end if
end repeat
end tell
end if -- docWindow
end if -- newName is not…
end duplicateTable
--=====
on parleAnglais()
local z
try
tell application theApp to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) samedi 19 septembre 2009 17:33:59 -
How to implement Rows Per Page Selector for a tabular form kind of report
Hello,
Can somebody please tell how to implement Rows Per Page Selector in a tabular form (updatable report)
-- similar to what we can have in an Interactive report---
Plz help me out.You have to create item text field or select list (in interactive report is select list, you can create static value for example 10, 15, 50 , 100,500,.....) . In the Tabular form you have to go Report Attributes, search Number of Rows (Item) and select your item. And thats all. If I help you please check CORRECT or Helpful.
-
Updating the particular row and column in a JTable
Hi,
I have a JTable which is having fixed number of columns. When i am trying to update a particular cell in the table
during programm execution i am not able to do it.
I am getting the row number and column number correctly. But when i am going to set the data it is not setting at the same row. It is setting some other row according to the m_index (according to the sorting).
i am doing :
JTableModel model = (JTableModel) m_TablePan.getTableModel();
model.setValueAt(savedData, row, column);See the convertXxxIndexToView and convertXxxIndexToModel methods.
db
Edited by: Darryl.Burke -- wrong methods suggested
Edit2: Evidently lipumama doesn't follow up on many questions posted.
One for the blacklist. -
How to implement session varibles and how to use it
how to implement session varibles and how to use it.ple help me
Please see the below blog, Hope it helps!!!
http://obieetraining11.blogspot.com/2012/06/create-initialization-block-for-session.html -
1 How to setup new company name 2 How to setup row, rock and bin
Hi,
Anybody who can help me how to setup new company.
And also how to setup row, rock and bin because we need to assign a location for our spare parts inventory.
Thanks in advance.Row/rack/bin sounds like an inventory system. For a simple system you might want to build your own from scratch, but for even a mid-sized company you really want a shrink-wrapped solution -- i.e. Oracle apps or SAP.
You don't want to be figuring out how to model material transactions, move orders, etc. Nor do you probably want to dive into various cost accounting options. -
( im new to java) How do I increase number of columns in a JTable ?
I am dooing a small calculating program in school and can't figure out how to change the amount of columns in a JTable, my programming skills sofar are extremely basic and therefore we are using the netbeans GUI to create our windows. The code generated by the GUI cannot be edited and I have tried to copy paste the code into Eclipse but it didn't work.
I have a fair idea of where in the code you can preform the things I want but I need to do it in the grapical interface.
any suggestions are very much appriciated.my programming skills sofar are extremely basic and therefore we are using the netbeans GUI to create our windows.Using and IDE doesn't not make it easier. As you've found out it only makes it harder since you can't edit the code and take full control.
Read the Swing tutorial, it contains plenty of example for building GUI applications:
http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
I don't really understand your question, because if you create the table correctly, then then is no need to increase the number of columns. However, the table does support an addColumn(....) method. -
How to implement uplink redundancy and spanning tree in SFP-300 switches
We have several Small Business 300 Series Managed Switches, the 10/100 ones with PoE, the first generation ones.
We've been advised to implement uplink redundancy and spanning tree on these switches.
I'm sure spanning tree is a checkbox somewhere in the web interface.
How does one implement uplink redundancy besides interconnecting the switches plus turning on spanning tree (RSTP)??
Thank you, Tom
P.S. I also tried to file a service request but it does not work, I get: "Error 500: Request processing failed; nested exception is java.lang.NullPointerException"Hello Thomas,
Thanks for using the Cisco Small Business eSupport Community. I've looked through the articles that are available in our Knowledge Base and found a few that I hope will be able to assist you in setting up spanning tree and link redundancy on your SFP300s:
In regards to link redundancy, the following article on LAG can hopefully provide some guidance:
Link Aggregate Group (LAG) Configuration on 200/300 Series Managed Switches
And for your question on setting up STP, here are a few articles with additional information:
Configure Spanning Tree Protocol (STP) Status and Global Settings on 200/300 Series Managed Switches
Setup Spanning Tree Protocol (STP) on a Interface on the 300 Series Managed Switches
I hope that this information helps! Please remember to mark your question as answered and rate if this solves your problem.
Best,
Gunner -
I news identici row and column in numbers over and left as in Excel. How can I do?
Hi Roanto,
Welcome to Apple Support Communities.
We're all feeling out way around in this newly designed environment, but I think I've discovered that the iWork applications for iPad are still in a community separate from those for the Mac versions of the iWork appplications.
Seeing as you question is about Numbers for iPad, you might find it better served in the https://discussions.apple.com/community/ipad/iwork_for_ipad>Numbers for iPad Community area. The link will take you to the front page of that community.
Regards,
Barry
PS: You might also consider rewriting your question. I'm having some difficulty deternmining exactly what you want to accomplish.
B -
How to implement row level security?
Hi all,
There is a database which is for 3 companies to use it and how to use row level security to make sure that they can only manipluate their own data? For example, "employee" table, for each company they just can see their own employees information. How to use dynamic view to do it?
Many Thanks
AmyHere are two options to achieve what you want.
A. You can do this by coding, that's if you are ready to. Are you? If yes then try the steps below:
1. create a security codes table. Say for example
001 - company a
002 - company b
2. create a security table that will list all users and which company they should have access to. You can also implement this by roles.
3. alter all tables in the application schema to add a security code column. This will be a foreign key reference to table created in 1 above.
4. update all data in the tables according to which company they belong to.
5. write a procedure or package that does a validity check whenever a user requests for data. This procedure/package determines which company data the user has access/rights to.
With this, you should be able to achieve what you want if you do not want to spend on VPD and FGAC. The problem comes where there are users who would have cross access to data from both companies. In this regard, then you have to modify your security table a little bit to handle this.
B. This option i will admit is not so clean. You can also achieve this by two different views for every table in the application schema. And on each of these views, create a private synonym for every user. For illustration purposes:
Table name = Employee.
Create a view employee_a on employee
create a view employee_b on employee
Let's say you have users x and y. X has access to employees of company a and y has access to employees of company b. You can now create private synonyms for each of these users as follows:
create synonym employee on employee_a in x schema.
create synonym employee on employee_b on y schema.
This i have not tried but believe should work.
Hope one of these options serve your purpose. -
How to implement row level secuirty at universe level
Hi All
How can we implement row level security in universe ?
JohnHI,
Can we try this?
Open designer >>tools>>Manage security>Manage access retrictions
Click on "new" under available restrictions area .
Select "rows" tab click add select the table and an appropriate where condition.
Click ok .
Add a user\group on which the retriction is to be imposed Click Ok.
Hope this will help
Kultar -
How to implement row level security using external tables
Hi All Gurus/ Masters,
I want to implement row level security using external tables, as I'm not sure how to implement that. and I'm aware of using it by RPD level authentication.
I can use a filter condition in my user level so that he can access his data only.
But when i have 4 tables in external tables
users
groups
usergroups
webgrups
Then in which table I need to give the filter conditions..
Pl let me know this ...You pull the Group into a repository variable using a session variable init block, then reference that variable in the data filters either in the LTS directly or in the security management as Filters. You reference it with the syntax VALUEOF("NQ_SESSION.Variable Name")
Hope this helps -
Hi All,
Question: How do I filter rows out of a query where multiple columns are equal to a single question mark character?
Background: I'm using SQL 2008 R2. Furthermore, the part of my brain that helps me create less-than-simple queries hasn't been working for the last 4 days, apparently, and now I need help.
We have about 4,000 rows in a table. This data set was generated from an exported report, and many of the rows in the detail table were not actual data rows but were simply "header" rows. For those table rows, most of the columns have
a single question mark as the value.
Some of the detail rows have one or more question mark values, too, so it's important that these rows don't get filtered out.
When I include criteria like "WHERE col1 <> '?' AND col2 <> '?' AND col3 <> '?' AND col4 <> '?'", all rows with a question mark value for even a single one of those columns get filtered out. How do I filter out rows
where all columns 1-4 contain a question mark value?
Thanks for your help,
EricI just tried to create to create a scenario for you. Please see ig you're looking for something like this.
Create table test_Question_mark
RecordID INT identity(1,1),
Col1 varchar(10),
Col2 varchar(10),
Col3 varchar(10),
Col4 varchar(10),
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','?','?','?')
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','??','?','?')
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','??','??','?')
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('??','??','??','??')
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','?','?','?')
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('??','test ??','??','??')
insert into test_Question_mark (Col1, Col2, Col3, col4) values ('??','test ?','??','??')
--drop table test_Questio_mark
select * from test_Question_mark
select * from test_Question_mark
WHERE
(CHARINDEX('?', Col1,1) > 0 AND CHARINDEX('?', Col1, CHARINDEX('?', Col1,1)+1) = 0) AND
(CHARINDEX('?', Col2) > 0 AND CHARINDEX('?', Col2, CHARINDEX('?', Col2,1)+1) = 0) AND
(CHARINDEX('?', Col3,1) > 0 AND CHARINDEX('?', Col3, CHARINDEX('?', Col3,1)+1) = 0) AND
(CHARINDEX('?', Col4,1) > 0 AND CHARINDEX('?', Col4, CHARINDEX('?', Col4,1)+1) = 0)
--drop table test_Questio_mark
I hope above solution will help.
Thanks!
Ashish. -
How to suppress row when one column has zero using condition
Hi Experts,
How do I suppress row when one column has zero.
I read it is possible using conditions.
How ?
Thankyou.Check this
1. for Query Properties, go to the Display tab and Supress Zeros is "Active"
2. select the Structure, right-click, select Properties, then click "on" Also Use Zero Suppression for Structure Elements
http://help.sap.com/saphelp_nw04/helpdata/en/a4/dd3841d132d92be10000000a1550b0/frameset.htm
Hope it Helps
Chetan
@CP..
Maybe you are looking for
-
Hi, I have the below query, but the output data for the Unavailable column is not showing all the data with a condition_id that's not null. Does anyone have any ideas that I might need to try? SELECT I.SKU_ID, I.DESCRIPTION, TO_CHAR(I.EXPIRY_DSTAMP,
-
PERMIT_READ to limit dimensions
Hi, I have a 9.2.0.6 EE DB running on Linux RHEL ES3.0. I am using AW to build a Cube and present it through Discoverer plus 10g. Everything is currently working fine and Discoverer produces great looking presentations out of OLAP. What I am trying t
-
Hello, Wondering how to subscribe to RSS Feeds using the Blackberry Browser. I have an 8330 Curve - 4.5.0.138 OS Found documentation that states the following: Subscribe to a web feed On a web page, press the Menu key. Click Add Web Feed. Select the
-
9iasR2, rwservlet, jsp report, output pdf HttpSession losing information
Hi, I think this is actually something I'm doing wrong with JDeveloper/my understanding of HttpSession, so I'm posting here after getting no help from the Reports folks. I have a number of .jsp reports and our application also generates letters for t
-
Connecting to personal oracle8 using connection wizard in jdeveloper3.0
i am trying to connect to oracle8 using jdbc using connection wizard in jdeveloper3.0 but when i test the connection i gives an error "no ocijdbc8 in shared library path" please help me out.