How to set different icon for different type of document
Hi,
In my repository, we have different kinds of document (crystal report, word document, excel, jpg ...) and we wanna show specific icon for each kind. In my used ResourceRender I cann't see where to change (rnd:icon?)
Could someone tell me how to achieve that? Thanks
Ray
Hi Ray Li,
in KM icons are mapped to mime types. You can add a mapping or change an existing one as follows:
1. Go to Systemadministrarion - System Configuration - Knowledge Management - Content Management - Utilities - Icons
2. Add your mime mapping or change an existing one. To determine the correct mime type of your documents, just have a look at the details dialog in KM.
3. The path to the icons points (by default) to following directory on your KM server: usr\sap\SID\SYS\global\config\cm\etc\public\mimes\images
Here you can replace images or add some new.
Hope this helps,
Carsten
Seems like somebody thought the same thought bit faster than I did. Would like to delete my answer that does not contain any additional info. But dunno how to.
Message was edited by: Carsten Buechert
Similar Messages
-
How to set different icons for different windows which is seen in the top left corner?
Hi
How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
Is there any way to set icon by calling any dlls.
Thanks & Regards
Samuel J
[email protected]Hi Sam,
no problem. See the attachment.
Mike
Attachments:
TestIcon_LV85.zip 44 KB -
How to display different icon, for different node of jtree
Hi All,
How to display different icon, for different node of jtreeyou haven't responded to my last post here: [http://forums.sun.com/thread.jspa?threadID=5323190&messageID=10382676#10382676|http://forums.sun.com/thread.jspa?threadID=5323190&messageID=10382676#10382676]
-
I want to change different icon for different leaf node
Hi,
i am reading file system(win 2000)and showing in a tree.i want to
show different icon for different file extension.
Pl suggest me with sample code,how should i do?
ThanxHi...
To do this, u need to write ur own TreeCellRenderer.
ex :
class FileSystemTreeCellRenderer extends JLabel implements TreeCellRenderer
File file= null;
public FileSystemTreeCellRenderer(File f)
this.file = f;
public Component getTreeCellRendererComponent
JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus
if(file.isDirectory())
setIcon("your image");
setText("file/dir name");
else
setIcon("your other image");
setText("file/dir name");
return this;
Hope it suits ur need .. (also, using the file extensions, u can set different icons following the above strategy...)
Regards,
Ramanujam -
How to set the icon for the entire application with JFrame.setIconImage
I set the icon on the main frame using JFrame.setIconImage(). The icon is shown properly in the main frame.
If more JFrames are opened from the main frame, the newly opened JFrames also show the icon.
However if JDialogs are opended, in some cases the icon set on the main frame is shown and in other cases the coffee cup.
What is JFrame.setIconImage() expected to do? Setting the icon for a single JFrame or the entire application?
How can I set the icon for the entire application?
How can I set the icon for JDialogs?
Thank youIn order for your dialogs to use the same icon as the frame, you must parent the dialogs to the frame which has the custom icon.
See the following thread for more information: http://forum.java.sun.com/thread.jsp?forum=57&thread=362542
cheers,
Greg -
How to set an icon for a JLabel with Advanced Synth
Hello,
Do you know how to define an icon for a JLabel components with Advanced Synth (with a XML file) ? I have tried this :
<style id="jLabelNotes">
<imageIcon id="iconNotes" path="images/note.png" />
<property key="Label.icon" value="iconNotes" />
</style>
<bind style="defaultLabel" type="name" key="jLabelNotes" />But nothing append.
Thanks.Try Sound Menu
-
Ho to set different Icon for different Jtree Nodes dynamically??
Dar Friends:
I have following code.
But if poosible I hope to:
[1]. Dynamically assign or st each node with different Icons;
[2]. these icons have different sizes, hope to resize them with same size, ie. 20X 20
But try whole day, no idea how to to it,
Can somebody throw a light??
Thanks
Good weekends
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
/** JTree with missing or custom icons at the tree nodes.
* 1999 Marty Hall, http://www.apl.jhu.edu/~hall/java/
public class CustomIcons extends JFrame {
public static void main(String[] args) {
new CustomIcons();
private Icon customOpenIcon = new ImageIcon("images/Circle_1.gif");
private Icon customClosedIcon = new ImageIcon("images/Circle_2.gif");
private Icon customLeafIcon = new ImageIcon("images/Circle_3.gif");
public CustomIcons() {
super("JTree Selections");
Container content = getContentPane();
content.setLayout(new FlowLayout());
DefaultMutableTreeNode root =
new DefaultMutableTreeNode("Root");
DefaultMutableTreeNode child;
DefaultMutableTreeNode grandChild;
for(int childIndex=1; childIndex<4; childIndex++) {
child = new DefaultMutableTreeNode("Child " + childIndex);
root.add(child);
for(int grandChildIndex=1; grandChildIndex<4; grandChildIndex++) {
grandChild =
new DefaultMutableTreeNode("Grandchild " + childIndex +
"." + grandChildIndex);
child.add(grandChild);
JTree tree3 = new JTree(root);
tree3.expandRow(3); // Expand children to illustrate leaf icons
DefaultTreeCellRenderer renderer3 = new DefaultTreeCellRenderer();
renderer3.setOpenIcon(customOpenIcon);
renderer3.setClosedIcon(customClosedIcon);
renderer3.setLeafIcon(customLeafIcon);
tree3.setCellRenderer(renderer3);
JScrollPane pane3 = new JScrollPane(tree3);
pane3.setBorder(BorderFactory.createTitledBorder("Custom Icons"));
content.add(pane3);
pack();
setVisible(true);
}Thanks for your advice,I post my code as below, (I cannot post Max 5000, so post twice)
[1]. main:
import javax.swing.*;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.*;
import java.awt.*;
public class JTreeNew extends JFrame {
public JTreeNew() {
super("Editable Tree Frame");
JTreeSub js = new JTreeSub();
setSize(200, 200);
// WindowUtilities.setNativeLookAndFeel();
// addWindowListener(new ExitListener());
setDefaultCloseOperation(EXIT_ON_CLOSE);
public class JTreeSub extends JTree implements TreeSelectionListener{
DefaultTreeModel treeModel;
JTree tree;
ContainerIconNode selectedNode;
public JTreeSub() {
super();
init();
public void init(){
ContainerIconNode Root = new ContainerIconNode("images/Root.GIF");
ContainerIconNode Animal = new ContainerIconNode("images/Animal.GIF");
ContainerIconNode Cat = new ContainerIconNode("images/Cat.GIF");
ContainerIconNode Fish = new ContainerIconNode("images/Fish.GIF");
ContainerIconNode GoldFish = new ContainerIconNode("images/GoldFish.GIF");
ContainerIconNode CatFish = new ContainerIconNode("images/CatFish.jpg");
ContainerIconNode Solomon = new ContainerIconNode("images/Solomon.GIF");
ContainerIconNode DogFish = new ContainerIconNode("images/DogFish.GIF");
ContainerIconNode Dog = new ContainerIconNode("images/Dog.jpg");
ContainerIconNode Mouse = new ContainerIconNode("images/Mouse.GIF");
ContainerIconNode Chicken = new ContainerIconNode("images/Chicken.GIF");
ContainerIconNode Pig = new ContainerIconNode("images/Pig.GIF");
treeModel = new DefaultTreeModel(Animal);
tree = new JTree(treeModel);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
ToolTipManager.sharedInstance().registerComponent(tree);
//Listen for when the selection changes.
tree.addTreeSelectionListener(this);
tree.setEditable(true);
treeModel.insertNodeInto(Animal,Root, 0);
Animal.add(Cat);
Animal.add(Fish);
Fish.add(GoldFish);
Fish.add(CatFish);
Fish.add(Solomon);
Fish.add(DogFish);
Animal.add(Dog);
Animal.add(Mouse);
Animal.add(Chicken);
Animal.add(Pig);
tree.expandRow(3); // Expand children to illustrate leaf icons
// DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
// renderer.setOpenIcon(Animal.getImageIcon());
// renderer.setClosedIcon(Dog.getImageIcon());
// renderer.setLeafIcon(CatFish.getImageIcon());
// tree.setCellRenderer(renderer);
ImageIcon startIcon = new ImageIcon("images/89.gif");
tree.setCellRenderer(new MyRenderer(startIcon));
getContentPane().add(tree, BorderLayout.CENTER);
@Override
public void valueChanged(TreeSelectionEvent e) {
selectedNode = (ContainerIconNode)
tree.getLastSelectedPathComponent();
if (selectedNode == null) return;
Object nodeInfo = selectedNode.getUserObject();
if (selectedNode.isLeaf()) {
System.out.println("<JTreeNew> Node is leaf=");
} else {
System.out.println("<JTreeNew> Node is folder");
private class MyRenderer extends DefaultTreeCellRenderer {
Icon nodeIcon;
public MyRenderer(ImageIcon icon) {
nodeIcon=icon;
public Component getTreeCellRendererComponent(
JTree tree,
Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) {
// System.out.println("<JTreeNew> Tree="+ tree);
// System.out.println("<JTreeNew> nodeIcon="+ nodeIcon);
System.out.println("\n<JTreeNew> value="+ value);
System.out.println("<JTreeNew> sel="+ sel+"\n");
// System.out.println("<JTreeNew> expanded="+ expanded);
// System.out.println("<JTreeNew> leaf="+ leaf);
// System.out.println("<JTreeNew> row="+ row);
// System.out.println("<JTreeNew> hasFocus="+ hasFocus);
return this;
public static void main(String args[]) {
JTreeNew st = new JTreeNew();
st.setVisible(true);
} -
How do I add shadow to a title, such as, NEW YEAR'S NEEDS, while in Pages? I also don't know how to set a new folder for documents of the same type such as, "Sermons," or "Lessons." Any help will be greatly appreciated.
DonnieYes, I very well may be over thinking this, but I tried duplicating and moving it, but the text distorts slightly, which can be mostly remedied by rotating it on the x-axis, although the light is still off. And the shadows and reflections are not visible - this is pic1... In pic2, I used "rotate 3d object" with the green and red arrows, instead of just sliding it up the y-axis using the coordinates in the scene tab. Using the green and red arrows to move the text preserved the reflections but the shadows now aren't visible. It was also hard to align the text perfectly in scenario 2. Thanks for the help
-
How to set an icon for quick change in audio-ouput source?
With a MacMini, I often need to switch between the internal speaker and a headset based earphone. Can I create an icon, which allows me a quick change; perhaps analogous to the 'volum" icon which allows a fast change in volume? Thanks and Cheers, Veit
Try Sound Menu
-
Setting software preference for file types
Hi all
Can someone please tell me how you set a preference for different file types? For example, I want all .avi files to play using VLC player and not Quicktime. However, my computer automatically wants to use Quicktime. How do I change this? I have looked in Preferences and couldn't see an option.
Thanks
StevenSelect an .avi file via the Finder and use Get Info for the file.
At Open With, select the VCL player and below "use this application to open all documents like this", select Change All. -
How to change the icon for print dialog?
Hello,
I have a JTable, and with the print() method, I'm able to bring up the Print dialog and successfully print the contents of the table. Example:
myTable.print( JTable.PrintMode.FIT_WIDTH, myHeaderFormat, myFooterFormat );This works great, but one small detail I'd like to change is the icon in the top-left corner of the dialog. The icon is currently the default Java coffee cup icon, while the rest of my application uses my custom icon. I couldn't find any documentation in the API or tutorials that Java has listed which shows how to change the icon, so I'm not even sure if it's possible (but why shouldn't it be?).
My question is this: Is it possible to change the default icon in the print dialog? Or do I have to either make my own print dialog somehow, or use a third-party print dialog?
Thankstjacobs01: Appreciate the assistance (despite your sass). I've already searched the API, tutorials, and this forum. I'm already well aware of the setIconImage() method for JFrame -- after all, that's how I set the icon for my other frames as I previously mentioned. However, I want to set the icon for the print dialog called from the print() method of JTable.
How would I use setIconImage() for the print() method of JTable? The print() method returns a boolean value, not a JFrame, so I'm just not sure how to implement what you're saying.
Thanks -
How to set different Icons for Jtreenode
How to set different Icons for Jtreenode,i want to set icons for jtreenode,not only for leaf,open,closeicon,i hope that each node has a different icon.Thanks!
you need to check for the node value within a renderer, then assign an icon based on what you expect to get back.
check out this page. http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html -
How can i set different font for different tabs/pages
I want to set different fonts for different tabs/pages?
is it possible to do the same? If yes how?
I can change the fonts under tools>options>contents>advanced. but that changes global settings.
tried some add ons too- but that too changes the global settings.
some pages like tweetdeck do not display icons etc properly under custom fonts.
when i check "allow pages to select their own font" tweetdeck shows up fine but a number of other pages show fonts that are too big or some non standard fonts.
Is there a way where i can select site default fonts for some sites/tabs, and custom fonts for other sites/tabs?
otherwise i have to open different sites in different browsers- say i use my custom fonts- which apply globally, and open tweetdeck etc in Internet Explorer or Chrome etc. if i can have all tabs in one window/browser, that would be great.It's not a built-in feature to override a page's styles on a tab-by-tab or site-by-site basis, but perhaps someone has created an add-on for this?
It also is possible to create style rules for particular sites and to apply them using either a userContent.css file or the Stylish extension. The Greasemonkey extension allows you to use JavaScript on a site-by-site basis, which provides further opportunity for customization. But these would take time and lots of testing to develop and perfect (and perfection might not be possible)...
Regarding size, does the zoom feature help solve that part? In case you aren't familiar with the keyboard and mouse shortcuts for quickly changing the zoom level on a page, this article might be useful: [[Font size and zoom - increase the size of web pages]]. -
Help needed - setting password policies for different types of accounts
Hello,
We have a situation where we have different types of users created on a solaris server. We have regular users, admins, functional accounts and device accounts. Of course solaris does not differentiate between regular user and other types, i think. The default password policy applies to all the users on the server. I want to configure different policy for different types of user accounts. Is it possible? The difference between the accounts on our side is
Regular user accounts - 8 digit numbers ( 00667265) - expire password every 90 days
Functional accounts - 8 digits starting with F ( F0253466) - do not expire, but password length must be 10-12 and complex
Device Accounts - 8 digits starting with Z ( Z2367249) - do not expire, but password length must be 12 and complex - like upper case, lower case, number, special chars etc.
Is it possible to set up different password policies, is so how?The password expiration policy is pretty easy, it can be set on a per account basis when the account is created. I'm not aware of a simple way to define a complexity policy for groups of accounts but the policy is enforced using pam, so you should be able to write a pam module which would enforce your complexity policy. The pam manual page would be a reasonable starting point for learning about pam.
-
How to set different header for different Standard report page
How to set different header for different Standard report page
Hi,
A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?
Maybe you are looking for
-
File,send link,is NOT underlined
<blockquote>Locking duplicate thread.<br> Please continue here: [/questions/785560]</blockquote><br> When i send links(file,send link) i would like that link underlined
-
Hello Cisco experts, I have an Access Point Cisco AP541N, working great, except that every 1 or 2 weeks, clients cannot connect anymore to it. I need to reboot it. I recently updated the firmware to the latest version (AP541N-K9-2.0(0)), but that did
-
Should I Optimize for "Memory" or "Performance" in Preferences?
I've been rendering the timeline prior to export and finding that it renders in just over an hour for a 30 minute project. Then, almost miraculously, the MPEG2-DVD export only takes about two hours or so. This is with "Maximum Render Quality" selecte
-
"A fatal error occurred during the XML merging process" - issue
All, We have now been able to by pass an initial error message (Failed to add BusinessObjects XI 3.1 SharePoint 2007 PIK to SharePoint) during the PIK installation, but unfortunately another one is popping up now. System specs: - Sharepoint 2007 SP2
-
Snow Leopard Server Software - Mac Mini Copy vs Retail Copy
Hi All, I recently purchased a mac mini server, with what I thought would be a SL Server license. I've used the Mac Mini to run a Leopard server whilst our Xserve was out of action. Now the xserve is back, I was thinking of installing SL on the Xserv